*Apache全般情報 [#ze850e75] #contents **2.0のtodo [#j506e0d6] +AddDefaultCharSetコメントアウト(2.0.53より削除されている) +LanguagePriority ja **httpd.confの設定 [#o7c9f932] -[[NameVirtualHost:http://www.ns-labs.com/linux/tsubo5.html]] *Apache [#s1fa31ec] ユーザーディレクトリ使用可能にする rootでchmod 751 username アクセス制限CGIディレクトリ <Directory /home/httpd/cgi-bin> AllowOverride AuthConfig Options ExecCGI Order allow,deny Allow from all </Directory> HTTP/HTTPS両対応 apt-get install mod_ssl libssl.soがあるとデフォルトの設定ファイルのままで対応可能。 CGI実行は httpdの実行者がapacheユーザーとなるので755にしないと500エラ #For CGI ScriptAliasMatch ^/~([a-zA-Z0-9_-]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2 <Directory /home/*/cgi-bin/> Options ExecCGI AddHandler cgi-script .cgi </Directory> **SSLの設定 [#f53d6837] LoadModule ssl_module modules/mod_ssl.so **Windowsで2.0とjkで連携 [#ef11dc2c] mod_jk.soはバイナリを入れる。configの設定はlinuxとまったく同じでよい *ワンテク [#h6c2ba88] |BASIC認証回避|http://id:pass@URL/| *モジュール設定 [#re781a60] **WebDAVの設定 [#zc2f0a66] 1.3系は日本語問題ありなのでできれば2.0系で運用すべし +mod_dav.soをインストール +httpd.confに以下のように追加 **mod_rewite [#scb3c74d] URL書き換えできるモジュール。ローカルアドレスをそのまま返すのでリバースプロキシーになりません。 **mod_proxy [#cdb91e5e] これでsquidいらず *SSIの利用 [#j55c4a00] Option Include or IncludesNoExec #AddType text/x-server-parsed-html .shtml AddHandler server-parsed .shtml 上記設定で.shtmlのみ利用可能になる *ログの設定 [#s16dfbd8] SetEnvIf Remote_Addr 192.168.1. homelog nolog SetEnvIf Request_URI "cbag" cblog nolog SetEnvIf Request_URI "default.ida" wormlog nolog SetEnvIf Request_URI "root.exe" wormlog nolog SetEnvIf Request_URI "cmd.exe" wormlog nolog SetEnvIf Request_URI "Admin.dll" wormlog nolog SetEnvIf Request_Method "(GET)|(POST)|(PUT)|(DELETE)|(HEAD)" !worm CustomLog logs/home_log common env=homelog CustomLog logs/cbag_log combined env=cblog CustomLog logs/worm_log common env=wormlog CustomLog logs/access_log combined env=!nolog *有用リンク [#y8991d8b] -[[パフォーマンスチューニング:http://tech.bayashi.net/svr/doc/apache/tune.html]]