Skip to content

Instantly share code, notes, and snippets.

@HammoTime
Created May 23, 2019 01:53
Show Gist options
  • Save HammoTime/d79f6a0a6567d57dbf205e6fb24350ef to your computer and use it in GitHub Desktop.
Save HammoTime/d79f6a0a6567d57dbf205e6fb24350ef to your computer and use it in GitHub Desktop.
server {
listen 443 ssl;
server_name _;
root /var/www/<DOMAIN_NAME>-wp;
index index.php;
keepalive_timeout 70;
ssl_certificate /etc/nginx/certs/<DOMAIN_NAME>.pem;
ssl_certificate_key /etc/nginx/certs/<DOMAIN_NAME>.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_pass php;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment