Skip to content

Instantly share code, notes, and snippets.

@MikeiLL
Created May 19, 2016 15:55
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 MikeiLL/e59cf3505896ffce222b55a7206ad182 to your computer and use it in GitHub Desktop.
Save MikeiLL/e59cf3505896ffce222b55a7206ad182 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name domain.com ;
access_log /srv/www/domain.com/logs/access.log;
error_log /srv/www/domain.com/logs/error.log;
root /srv/www/domain.com/current/web;
index index.php index.htm index.html;
charset utf-8;
add_header Fastcgi-Cache $upstream_cache_status;
include acme-challenge-location.conf;
include includes.d/domain.com/*.conf;
include wordpress.conf;
location ~ \.php$ {
try_files $uri =404;
error_page 404 /index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_pass unix:/var/run/php-fpm-wordpress.sock;
}
}
server {
listen 80;
server_name www.domain.com;
include acme-challenge-location.conf;
location / {
return 301 $scheme://domain.com$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment