Apache 2.2
どうせなら新しいブツを入れてみようか。
導入
まずは普通に ports からインストール。
suEXEC を使うのでオプションに指定。
# make WITH_SUEXEC=yes SUEXEC_DOCROOT=/home install clean
設定
とりあえず適当に。
# vi /usr/local/etc/apache22/httpd.conf
ServerAdmin webmaster@example.ne.jp ServerName www.example.ne.jp:80 Options Includes FollowSymLinks ExecCGI MultiViews <IfModule dir_module> DirectoryIndex index.html index.htm index.shtml index.cgi </IfModule> LogFormat "%h %l %u %t \"%!414r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined CustomLog /var/log/httpd-access.log combined env=!nolog SetEnvIf Request_URI "\.(gif)|(jpg)|(png)|(css)|(ico)$" nolog SetEnvIf Remote_Addr "192\.168\.*" nolog SetEnvIf Request_URI "default.ida" nolog SetEnvIf Request_URI "NULL.IDA" nolog SetEnvIf Request_URI "root.exe" nolog SetEnvIf Request_URI "cmd.exe" nolog SetEnvIf Request_URI "Admin.dll" nolog SetEnvIf Request_URI "owssvr.dll" nolog SetEnvIf Request_URI "cltreq.asp" nolog AddHandler cgi-script .cgi AddType text/html .shtml AddOutputFilter INCLUDES .shtml Include etc/apache22/extra/httpd-multilang-errordoc.conf Include etc/apache22/extra/httpd-languages.conf Include etc/apache22/extra/httpd-userdir.conf Include etc/apache22/extra/httpd-default.conf Include etc/apache22/extra/httpd-ssl.conf
# vi /usr/local/etc/apache22/extra/httpd-multilang-errordoc.conf
<Directory "/usr/local/www/apache22/error"> LanguagePriority ja en cs de es fr it ko nl pl pt-br ro sv tr </Directory>
# vi /usr/local/etc/apache22/extra/httpd-languages.conf
LanguagePriority ja en ca cs da de el eo es et fr he hr it ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
# vi /usr/local/etc/apache22/extra/httpd-userdir.conf
<Directory /home/*/public_html> Options MultiViews SymLinksIfOwnerMatch IncludesNoExec </Directory> <Directory /home/*/public_html/cgi-bin> AllowOverride none Options ExecCGI Order deny,allow Allow from all </Directory>
# vi /usr/local/etc/apache22/extra/httpd-ssl.conf
<VirtualHost _default_:443> ServerName www.example.ne.jp:443 ServerAdmin webmaster@example.ne.jp </VirtualHost>
とりあえずこんな感じかな。
他にも設定する項目があるけど、とりあえず保留で。