apache を利用しての public_html が公開できない
できないんですよ。orz
CentOS 4.4の環境でやったこと。
userdir なモジュールを有効にした。
LoadModule しました。
LoadModule userdir_module modules/mod_userdir.so
userdir なモジュールの設定をした
<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 enabled ir9 # UserDir disabled root UserDir public_html </IfModule>
ディレクトリを設定した
とりあえず無条件に Allow してみたのですが…どーもダメでした。 orz
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Order allow,deny Allow from all # <Limit GET POST OPTIONS> # Order allow,deny # Allow from all # </Limit> # <LimitExcept GET POST OPTIONS> # Order deny,allow # Deny from all # </LimitExcept> </Directory>
ディレクトリのアクセス権
index.html の other に 実行権限つけようがつけまいが同じ。
drwxrwxr-x 2 ir9 ir9 4096 11月 6 07:37 public_html // public_html の中のファイル -rw-rw-r-x 1 ir9 ir9 5 11月 6 07:37 index.html
セキュリティコンテキスト
httpd な コンテンツにしてるんですが…
drwxrwxr-x ir9 ir9 user_u:object_r:httpd_user_content_t public_html
変なこと
- ~ir9/index.html
- ~ir9/
- ~ir9/kanaria.html <- このファイルは無い
どのurlに飛んでも 403 なんですよ。 なんで 3番目も 403 なんねんと。
エラーログ
全て 403
[Thu Nov 09 16:04:33 2006] [error] [client 192.168.169.2] (13)Permission denied: access to /~ir9/index.html denied [Thu Nov 09 16:04:36 2006] [error] [client 192.168.169.2] (13)Permission denied: access to /~ir9/ denied [Thu Nov 09 16:04:38 2006] [error] [client 192.168.169.2] (13)Permission denied: access to /~ir9/aaa denied [Thu Nov 09 16:23:16 2006] [error] [client 192.168.169.2] (13)Permission denied: access to /~ir9/kanaria.html denied
何が原因だろう……。 …なんか SELinux が影響してそうなヨカンですが…うむむむ…