VirtualHost 80 Location static SetHandler None Location Location robot

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<VirtualHost *:80>
<Location "/static">
SetHandler None
</Location>
<Location "/robots\.txt">
SetHandler None
</Location>
<Directory /home/pymuzx/muzx>
SetHandler fcgid-script
SetEnv PYTHONPATH /home/pymuzx/muzx
Options ExecCGI
</Directory>
ErrorLog logs/pymuzx-error_log
CustomLog logs/pymuzx-access_log common
DocumentRoot /home/pymuzx/muzx/
ServerName muzx.net
ServerAlias www.muzx.net
Alias /media /usr/lib/python2.5/lib/python2.5/site-packages/django/contrib/admin/media
Alias /robots\.txt /home/pymuzx/muzx/robots.txt
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.muzx.net$ [NC]
RewriteRule ^(.*)$ http://muzx.net$1 [R=301,L]
RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
RewriteRule ^/(static.*)$ /$1 [QSA,L,PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ /muzx.fcgi/$1 [QSA,L]
</VirtualHost>