Skip to content

Instantly share code, notes, and snippets.

@daktak
Created May 21, 2014 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daktak/dba6de537ec0a9fcebea to your computer and use it in GitHub Desktop.
Save daktak/dba6de537ec0a9fcebea to your computer and use it in GitHub Desktop.
nZEDb nginx.conf
location /nzedb/ {
try_files $uri $uri/ @rewrites;
alias /opt/nzedb/nZEDb/www/;
}
location /nzedb/covers/ {
try_files $uri $uri/ @rewrites;
alias /opt/nzedb/nZEDb/resources/covers/;
}
location ~ ^/nzedb/(.+\.php)$ {
alias /opt/nzedb/nZEDb/www/;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$1;
}
location @rewrites {
rewrite ^/nzedb/([^/\.]+)/([^/]+)/([^/]+)/? /nzedb/index.php?page=$1&id=$2&subpage=$3 last;
rewrite ^/nzedb/([^/\.]+)/([^/]+)/?$ /nzedb/index.php?page=$1&id=$2 last;
rewrite ^/nzedb/([^/\.]+)/?$ /nzedb/index.php?page=$1 last;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment