Skip to content

Instantly share code, notes, and snippets.

@hrach
Created June 9, 2014 20:50
Show Gist options
  • Save hrach/3431ff79cdab1dcbd594 to your computer and use it in GitHub Desktop.
Save hrach/3431ff79cdab1dcbd594 to your computer and use it in GitHub Desktop.
nginx + Nette framework rewrite
server {
listen 80;
server_name example.com;
root d:/webs/example.com/www;
index index.php index.html;
try_files $uri $uri/ /index.php?$args;
location ~ \.phpt?$ {
try_files $uri @missing;
fastcgi_pass 127.0.0.1:9123;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location @missing {
fastcgi_pass 127.0.0.1:9123;
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