Apacheでユーザー毎にディレクトリを公開する
はまったのでメモ。
環境はCentOS6.4付属のApache 2.2.15。
httpd.conf の修正
httpd.conf を開いて、
- userdir_moduleモジュールをロードする
LoadModule userdir_module modules/mod_userdir.so
<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 disabled # # To enable requests to /~user/ to serve the user's public_html # directory, remove the "UserDir disabled" line above, and uncomment # the following line instead: # UserDir public_html </IfModule>
#service httpd restart