Skip to content

Instantly share code, notes, and snippets.

@paulofreitas
Created October 17, 2017 00:18
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 paulofreitas/87ef05b5beceb5ebaa194e1cbd458b4f to your computer and use it in GitHub Desktop.
Save paulofreitas/87ef05b5beceb5ebaa194e1cbd458b4f to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name domain.com www.domain.com;
root /home/username/domain.com/public;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log /home/username/domain.com/var/logs/access.log combined;
error_log /home/username/domain.com/var/logs/error.log error;
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment