Skip to content

Instantly share code, notes, and snippets.

Created December 19, 2017 19: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 anonymous/816ff488bb289b9b03ab4131a7cfda89 to your computer and use it in GitHub Desktop.
Save anonymous/816ff488bb289b9b03ab4131a7cfda89 to your computer and use it in GitHub Desktop.
server {
root /var/www/html/test;
location ~ /\.ht {
deny all;
}
location / {
index index.php index.html index.htm fastcgi_index;
try_files $uri $uri =404 $uri/ /index.php?$args;
}
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|pdf)$ {
expires 365d;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
listen 80; # managed by Certbot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment