Skip to content

Instantly share code, notes, and snippets.

@brettbuddin
Created July 3, 2009 02:38
Show Gist options
  • Save brettbuddin/139873 to your computer and use it in GitHub Desktop.
Save brettbuddin/139873 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name intraspirit.net;
root /path/to/public/;
index index.php;
access_log /path/to/access.log;
error_log /path/to/error.log;
location / {
if (!-e $request_filename) { rewrite ^(.*[^/])$ $1/ permanent; }
if (!-e $request_filename) {
rewrite ^/symphony/(.*)$ /symphony/index.php?page=$1 last;
rewrite ^/(.*)/(?:\?(.*))?$ /index.php?page=$1$2 last;
}
}
location ~ \.php$ {
try_files $uri @symphony;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /path/to/public/$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
include /opt/nginx/conf/fastcgi_params;
}
location @symphony {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /path/to/public/index.php;
fastcgi_param QUERY_STRING page=$request_uri;
include /opt/nginx/conf/fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment