Created
May 19, 2016 15:55
-
-
Save MikeiLL/e59cf3505896ffce222b55a7206ad182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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