Skip to content

Instantly share code, notes, and snippets.

@int32at
Created February 27, 2018 20:48
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 int32at/a286d8b4b86bb1a0dd18c15c09cb4406 to your computer and use it in GitHub Desktop.
Save int32at/a286d8b4b86bb1a0dd18c15c09cb4406 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name example.com www.example.com;
root /var/www/example.com;
index index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment