[root@fedora ~]# vi /etc/httpd/conf/httpd.conf ← Apache設定ファイル編集
<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
↓
#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
↓
UserDir public_html ← 行頭の#を削除(コメント解除)
AliasMatch ^/fedora(.*) /home/fedora/public_html/$1
← fedoraユーザーのみhttp://fedorasrv.com/fedora/のように~(チルダ)なしでアクセスできるようにする
AliasMatch ^/userdir/([^/]+)/(.*) /home/$1/public_html/$2
← 全てのユーザーでhttp://fedorasrv.com/userdir/ユーザー名/でアクセスできるようにする
</IfModule>
#<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>
以下の全行追加
<Directory /home/*/public_html>
AllowOverride All ← .htaccessの許可
Options IncludesNoExec ExecCGI FollowSymLinks ← CGI,SSI(Exec命令以外)の許可
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
[root@fedora ~]# /etc/rc.d/init.d/httpd reload ← Apache設定反映
httpd を再読み込み中: [ OK ]
|
|