最終更新: nishiwaki0624 2009年11月03日(火) 20:41:00履歴
# vi /etc/httpd/conf/httpd.conf 【44行目】 ServerTokens OS ↓ ServerTokens Prod ←OSの表示がされないようにする 【251行目】 ServerAdmin root@localhost ↓ ServerAdmin (管理者)@nantonaku.myhome.cx ←管理者のメールアドレスを指定 【265行目】 #ServerName www.example.com:80 ↓ ServerName nantonaku.homelinux.com:80 ←サーバー名を指定 【320行目】 Options Indexes FollowSymLinks ↓ Options FollowSymLinks Includes ExecCGI ←SSI,CGIの実行を許可する 【327行目】 AllowOverride None ↓ AllowOverride All ←.htaccessを許可する 【391行目】 DirectoryIndex index.html index.html.var ↓ DirectoryIndex index.html index.html.var index.cgi index.php ←ディレクトリ名だけでアクセス可能にする 【524行目】 ServerSignature On ↓ ServerSignature Off ←Apacheのバージョンを表示しない 【542行目】 Options Indexes MultiViews ↓ Options MultiViews ←ファイル一覧を表示しないようにする 【747行目】 AddDefaultCharset UTF-8 ↓ #AddDefaultCharset UTF-8 ←コメントアウト 【778行目】 #AddHandler cgi-script .cgi ↓ AddHandler cgi-script .cgi .pl ←".pl"を追加
# rm -f /etc/httpd/conf.d/welcome.conf ↑ウェルカムページ削除 # rm -f /var/www/error/noindex.html ↑デフォルトエラーページ削除
# ln -s /usr/bin/perl /usr/local/bin/perl # whereis perl perl: /usr/bin/perl /usr/local/bin/perl /usr/share/man/man1/perl.1.gz ↑Perlのパスに/usr/local/bin/perlが表示されることを確認