Skip to content

Instantly share code, notes, and snippets.

@noodlehaus
Created February 7, 2014 08:13
Show Gist options
  • Save noodlehaus/8858906 to your computer and use it in GitHub Desktop.
Save noodlehaus/8858906 to your computer and use it in GitHub Desktop.
server {
listen 8080;
server_name myserver;
root /path/to/root;
access_log /var/log/myserver-access.log;
error_log /var/log/myserver-error.log debug;
location / {
try_files $uri $uri/ @site;
}
# return 404 for all php files as we do have a front controller
location ~ \.php$ {
return 404;
}
# fast cgi pass
location @site {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment