Skip to content

Instantly share code, notes, and snippets.

@ThePixelDeveloper
Created April 7, 2010 14:15
Show Gist options
  • Save ThePixelDeveloper/358926 to your computer and use it in GitHub Desktop.
Save ThePixelDeveloper/358926 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name nolimits.localhost;
root /home/mathew/www/nolimits-exchange/new/public;
index index.php index.html index.htm;
client_max_body_size 25m;
# Timeout
fastcgi_read_timeout 300;
location / {
if (-f $document_root/maintenance.html) {
return 503;
}
try_files $uri $uri/ @exchange;
}
error_page 503 /maintenance.html;
location = /maintenance.html {
break;
}
# Rewrites
rewrite ^/vanilla(.*) http://forum.domain.com$1 permanent;
location ^~ /upload/screenshots/ {
expires max;
add_header Cache-Control public;
break;
}
location ^~ /upload/coasters/ {
return 404;
}
location ~* \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
}
location @exchange {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment