
Untitled
By: a guest on
May 4th, 2012 | syntax:
None | size: 1.19 KB | hits: 13 | expires: Never
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /sw/etc/nginx/conf/mime.types;
default_type application/octet-stream;
#sendfile on;
#tcp_nopush on;
keepalive_timeout 2;
gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml+rss text/javascript;
server {
listen 80;
server_name localhost *.localhost;
if ($host ~ "^(.*)\.localhost$") {
set $subdomain $1;
}
access_log logs/access.log;
error_log logs/error.log;
location ^~ /favicon.ico {
return 204;
}
location ^~ /site_media/ {
alias F:\\Files\\coding\\django\\pandamian\\mysite\\templates\\;
}
location ~ ^/(cover\.(gif|jpg|jpeg|png))$ {
# we can rely on the fact that uninitialised variables are set to ''
if ($subdomain = '') {
return 404;
break;
}
alias F:\\Files\\coding\\django\\pandamian\\mysite\\user_data\\$subdomain\\$1;
}
location / {
rewrite ^/development/(.*) /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8000;
}
}
}