<![CDATA[Latest posts for the topic "[Help]Config Apache"]]> /hvaonline/posts/list/24.html JForum - http://www.jforum.net [Help]Config Apache Code:
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid.  This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
    #UserDir disable

    #
    # To enable requests to /~user/ to serve the user's public_html
    # directory, remove the "UserDir disable" line above, and uncomment
    # the following line instead:
    # 
    UserDir public_html

</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
SeLinux Code:
Last login: Tue May  6 10:04:40 2008 from 192.168.1.2
[root@localhost ~]# getsebool -a|grep httpd
allow_httpd_anon_write --> off
allow_httpd_dbus_avahi --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_network_connect --> on
httpd_can_network_connect_db --> on
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> on << cái này em set on mà
httpd_ssi_exec --> off
httpd_tty_comm --> on
httpd_unified --> on
httpd_use_cifs --> off
httpd_use_nfs --> off
[root@localhost ~]#
Sau đó em tạo thư mục public_html trong /home/user và chmod nó là 755. Rùi copy các file *.html vào đó. Nhưng khi type http://192.168.1.3/user/index.html vào FF nó lại báo lỗi Code:
Not Found

The requested URL /user/index.html was not found on this server.
Apache/2.2.6 (Fedora) Server at 192.168.1.3 Port 80
còn http://192.168.1.3/index.html lại chạy bình thường Các anh làm ơn chỉ giúp em cách cấu hình để chạy dc các file trong userDir như mấy site trên mạng ấy. :( thanks các anh nhìu ]]>
/hvaonline/posts/list/21792.html#129621 /hvaonline/posts/list/21792.html#129621 GMT
Re: [Help]Config Apache /hvaonline/posts/list/21792.html#129681 /hvaonline/posts/list/21792.html#129681 GMT Re: [Help]Config Apache pnco.]]> /hvaonline/posts/list/21792.html#129707 /hvaonline/posts/list/21792.html#129707 GMT Re: [Help]Config Apache http://www.google.com.vn/search?q=virtual+host&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a ]]> /hvaonline/posts/list/21792.html#129713 /hvaonline/posts/list/21792.html#129713 GMT Re: [Help]Config Apache

pnco wrote:
thử http://xxx.xxx.xxx.xxx/~user/index.html xem có IfModule nhưng có LoadModule chưa? 
Em chưa bít nhìu nhưng nhìn qua cái httpd.conf thấy có dòng này hok bít có phải là Loadmodule hok :"> Code:
LoadModule userdir_module modules/mod_userdir.so
Em đã thử http://xxx.xxx.xxx.xxx/~user/index.html nhưng bây giờ nó lại báo là Code:
Forbidden

You don't have permission to access /~zError/index.php on this server.
Apache/2.2.6 (Fedora) Server at 192.168.1.3 Port 80
Code:
[root@localhost home]# ls -al
total 24
drwxr-xr-x  3 root   root   4096 2008-05-06 09:55 .
drwxr-xr-x 21 root   root   4096 2008-05-08 22:44 ..
drwxrwxr-x  4 zError apache 4096 2008-05-06 10:05 zError << chmod 755
[root@localhost home]# cd zError
[root@localhost zError]# ls -al
total 56
drwxrwxr-x 4 zError apache 4096 2008-05-06 10:05 .
drwxr-xr-x 3 root   root   4096 2008-05-06 09:55 ..
-rw-r--rw- 1 zError apache   33 2008-05-06 09:55 .bash_logout
-rw-r--rw- 1 zError apache  176 2008-05-06 09:55 .bash_profile
-rw-r--rw- 1 zError apache  124 2008-05-06 09:55 .bashrc
drwxrwxr-x 2 zError apache 4096 2008-05-06 09:55 .gnome2
drwxrwxr-x 2 zError apache 4096 2008-05-06 10:07 public_html << chmod 755
Em chmod vậy mà sao nó lại ko cho phép truy cập nhỉ ? :(]]>
/hvaonline/posts/list/21792.html#129738 /hvaonline/posts/list/21792.html#129738 GMT
Re: [Help]Config Apache /hvaonline/posts/list/21792.html#129745 /hvaonline/posts/list/21792.html#129745 GMT Re: [Help]Config Apache

cuti_ver2 wrote:
Code:
Forbidden

You don't have permission to access /~zError/index.php on this server.
Apache/2.2.6 (Fedora) Server at 192.168.1.3 Port 80
Em chmod vậy mà sao nó lại ko cho phép truy cập nhỉ ? :( 
Bạn xem log trong /var/log/httpd, phần lớn sẽ biết nguyên nhân và cách khắc phục.]]>
/hvaonline/posts/list/21792.html#129748 /hvaonline/posts/list/21792.html#129748 GMT
Re: [Help]Config Apache <Directory > :) ]]> /hvaonline/posts/list/21792.html#129755 /hvaonline/posts/list/21792.html#129755 GMT Config Apache /hvaonline/posts/list/21792.html#226996 /hvaonline/posts/list/21792.html#226996 GMT Config Apache

hieubkit wrote:
bạn ơi, có cách nào cho apache có quyền root trong centos ko vậy??? Chỉ cho mình với? 
Để làm gì vậy bạn?]]>
/hvaonline/posts/list/21792.html#226997 /hvaonline/posts/list/21792.html#226997 GMT
Config Apache /hvaonline/posts/list/21792.html#227012 /hvaonline/posts/list/21792.html#227012 GMT Config Apache

hieubkit wrote:
mình muốn cho apache chạy ssh và scp trên một số file của hệ thống. 
Các file này do cái gì tạo ra và đặt ở đâu? ]]>
/hvaonline/posts/list/21792.html#227015 /hvaonline/posts/list/21792.html#227015 GMT