« Mac OSX * Apache2 * php5 | メイン | Mac版FirefoxのGoogleプラグインの設定を変更 »

Apache2 * /Users/*/Sites的な事

Mac OSXにデフォルトに代わってApache2.xを入れた時、80ではすぐ上がるようになるが、デフォルトApacheの如く/Users/*/Sitesを表示させるためにはもう一捻りする。

httpd.confの最後の方の

# User home directories # Include conf/extra/httpd-userdir.conf <= これ

のコメントアウトを外し

# User home directories Include conf/extra/httpd-userdir.conf

とする。
そしてこのInclude元である[Apache_home]/conf/extra/httpd-userdir.confを開き、下記のように編集する。

# Settings for user home directories # # Required module: mod_userdir

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. Note that you must also set
# the default access control for these directories, as in the example below.
#
#UserDir public_html
UserDir /Users/*/Sites

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#
<Directory /Users/*/Sites>
AllowOverride FileInfo AuthConfig Limit Indexes
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>

これでApacheに再起動かけると、デフォルトApacheの如く/Users/*/Sitesを表示できるようになる。



About

2006年08月29日 12:23に投稿されたエントリーのページです。

ひとつ前の投稿は「Mac OSX * Apache2 * php5」です。

次の投稿は「Mac版FirefoxのGoogleプラグインの設定を変更」です。

他にも多くのエントリーがあります。メインページアーカイブページも見てください。