Skip to content

Instantly share code, notes, and snippets.

@andydvsn
Last active October 31, 2016 23:12
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 andydvsn/cca0dc1ca26a8592e29992fd1dd2367c to your computer and use it in GitHub Desktop.
Save andydvsn/cca0dc1ca26a8592e29992fd1dd2367c to your computer and use it in GitHub Desktop.
Nginx HTTP
server {
listen 80;
listen [::]:80;
server_name YOUR.SERVER.NAME;
root /srv/www;
index index.php index.html index.htm;
location / {
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
@andydvsn
Copy link
Author

andydvsn commented Sep 4, 2016

Straightforward port 80 HTTP configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment