Skip to content

Instantly share code, notes, and snippets.

@Spirans
Created March 21, 2018 09:51
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 Spirans/2283052b6885e950ecb1463b4ede78a0 to your computer and use it in GitHub Desktop.
Save Spirans/2283052b6885e950ecb1463b4ede78a0 to your computer and use it in GitHub Desktop.
upstream php {
server BACKEND;
}
server {
listen 80;
server_name SERVER_NAME;
access_log /dev/stdout;
error_log /dev/stderr;
root /var/www;
charset utf-8;
location / {
index index.php;
try_files $uri $uri/ @handler;
}
location @handler {
rewrite / /index.php;
}
location ~ \.php$ {
fastcgi_pass php;
expires off;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_connect_timeout 60s;
fastcgi_read_timeout 180s;
fastcgi_send_timeout 180s;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment