2008/06/18 12:42
yum -y install httpd
#Apacheのバージョン情報などをレスポンスヘッダに出力させない ServerTokens ProductOnly
/sbin/service httpd start
/sbin/chkconfig --level 35 httpd on
#UserDir disableUserDir public_htmlの行のコメントアウトを外す。
UserDir public_htmlこのままだと、http://(DomainName)/~(UserName)でアクセスする事になる。http://(DomainName)/(UserName)がよければ以下の1行を追加。
AliasMatch ^/userdir/([^/]+)/(.*) /home/$1/public_html/$2<Directory /home/*/public_html>~</Directory>のコメントアウトを全て外す。
<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>
必要なディレクティブは適宜追加編集。
useradd (UserName) passwd (UserName)パスワードの入力を2回求められるので同じものを入力しユーザー作成完了。/home/(UserName)が作成されている。
chmod 711 /home/(UserName)
関連記事