Created
February 27, 2012 03:59
-
-
Save zackster/1921244 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name www.compassionpit.org; | |
rewrite ^/(.*) http://www.compassionpit.com/$1 permanent; | |
} | |
server { | |
listen 80; # your server's public IP address | |
server_name www.compassionpit.com; | |
index index.php index.html; | |
location ~ ^/$ { | |
proxy_pass http://127.0.0.1:8000; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
break; | |
} | |
location @blogphp { | |
internal; | |
root /opt/blog; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root/index.php; | |
fastcgi_index index.php; | |
fastcgi_pass 127.0.0.1:8080; | |
break; | |
} | |
location ~ ^/(forum|blog)/($|.*\.php) { | |
root /opt/; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_index index.php; | |
fastcgi_pass 127.0.0.1:8080; | |
break; | |
} | |
location ~ ^/(forum|blog) { | |
root /opt/; | |
try_files $uri $uri/ @blogphp; | |
break; | |
} | |
location ~ ^/(forum|blog|vbulletin)/ { | |
root /opt/; | |
break; | |
} | |
location @backend { | |
internal; | |
proxy_pass http://127.0.0.1:8000; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
break; | |
} | |
location ~ / { | |
root /opt/chat/static/; | |
try_files $uri $uri/ @backend; | |
break; | |
} | |
location /forum/ { | |
rewrite ^/forum/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /forum/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last; | |
try_files $uri $uri/ /forum/vbseo.php?$args; | |
} | |
location ~ /forum/(.*\.php)$ { | |
rewrite ^/forum/(.*)$ /forum/vbseo.php last; | |
} | |
location /forum/vbseo/(includes|resources/html|resources/xml)/ { | |
allow 127.0.0.1; | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment