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

変なこと

  1. ~ir9/index.html
  2. ~ir9/
  3. ~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 が影響してそうなヨカですが…うむむむ…

余談

ひぐらしメソッド を利用してみました。 なんだかとてもひぐらし厨っぽく見え始めましたが、私自身ひぐらしくわかりません。



…嘘だッ!!!


解答編に続く...