Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts

Tuesday, January 15, 2008

直リンクの禁止 バーチャルドメインの場合

<VirtualHost 192.168.*.*>
ServerName example.com
DocumentRoot /home/example/htdocs
ServerAdmin webmaster@www.hoge.co.jp
ErrorLog logs/error_log
TransferLog logs/access_log

#<Files *.gif>

<Files ~ "\.(tbz|tgz|bz2|gz|tar|lzh|zip|mag|png|jpeg|jpg|gif)$">

SetEnvIf referer "^http://example\.com" RefOk
Order Deny,Allow
Deny from all
Allow from env=RefOk
</Files>

</VirtualHost>

Thursday, March 29, 2007

apache の設定サンプル

<Files *.pl>
Options ExecCGI
allow from all
SetHandler perl-script
PerlHandler Apache::Registry
PerlModule Apache::DBI
PerlInitHandler Apache::StatINC
PerlSendHeader Off
PerlSetEnv TMPDIR /tmp
</Files>