httpd.conf の書き方 tips
<VirtualHost hogehoge:80>
SetEnvIf Request_URI "Zope" zopelog
CustomLog /log_path/zope.log combined env=zopelog
RewriteEngine on
RewriteRule ^/Zope$ /Zope/ [R]
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/Zope/(.*) /cgi_path/Zope.cgi/$1 [env=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
<Directory /cgi_path>
Options +ExecCGI
</Directory>
<IfDefine SSL>
<LocationMatch "/Zope/(.*)manage(.*)">
SSLRequireSSL
</LocationMatch>
<LocationMatch "/cgi-bin/Zope.cgi(.*)manage(.*)">
SSLRequireSSL
</LocationMatch>
</IfDefine>
</VirtualHost hogehoge:80>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog /var/log/apache/rewrite_log
RewriteLogLevel 2
RewriteRule ^/local/ - [L]
RewriteRule ^/icons/ - [L]
RewriteRule ^/~(.*) - [L]
RewriteRule ^/cgi-bin/ - [L]
# これが置換ルールの直前に無いと認証できません。
RewriteCond %{HTTP:Authorization} ^(.*)
# このへんはお好みで置換ルールを変えると良い。
RewriteRule ^/(.*) ?
/usr/lib/cgi-bin/Zope/$1 ?
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
</IfModule>
SetEnvIf Request_URI "default?.ida" wormlog
SetEnvIf Request_URI "cmd?.exe" wormlog
SetEnvIf Request_URI "root?.exe" wormlog
SetEnvIf Request_URI "Admin?.dll" wormlog
CustomLog /log_path/httpd-worm.log combined env=wormlog
CustomLog /log_path/httpd-access.log combined env=!wormlog
ZopeFAQ9 へ戻る。
| Last edited Sat, 09 Sep 2006 18:24:56 +0900 | Edit this page |