Created
July 9, 2014 11:52
-
-
Save dannysheehan/68d34b70ec6c633a5a0f to your computer and use it in GitHub Desktop.
/etc/nginx/enabled/ftmon.org.conf
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 127.0.0.1:8080; | |
server_name ftmon.org; | |
port_in_redirect off; | |
return 301 $real_scheme://www.ftmon.org$request_uri; | |
} | |
server { | |
listen 127.0.0.1:8080; | |
port_in_redirect off; | |
server_name www.ftmon.org; | |
root /home/wpmsite/domains/ftmon.org/public_html; | |
access_log /home/wpmsite/domains/ftmon.org/logs/access.log main; | |
error_log /home/wpmsite/domains/ftmon.org/logs/error.log error; | |
index index.php index.html index.htm; | |
autoindex off; | |
pagespeed on; | |
# Allow pagespeed to bypass the load balancer | |
pagespeed MapOriginDomain http://127.0.0.1:8080 https://www.ftmon.org; | |
pagespeed MapOriginDomain http://127.0.0.1:8080 http://www.ftmon.org; | |
# Allow pagespeed to bypass nginx | |
# pagespeed LoadFromFile http://www.ftmon.org /home/wpmsite/domains/ftmon.org/public_html; | |
# pagespeed LoadFromFile https://www.ftmon.org /home/wpmsite/domains/ftmon.org/public_html; | |
pagespeed DisableFilters combine_css; | |
pagespeed DisableFilters combine_javascript; | |
include /etc/nginx/common/pagespeed.conf; | |
# Rewrites for multisite -> main site move. | |
rewrite ^(/files/)(.*)$ /wp-content/uploads/$2 permanent; | |
rewrite ^(/wp-content/blogs.dir/22/files/)(.*)$ /wp-content/uploads/$2 permanent; | |
# Rewrites for multisite -> multisite move. | |
#rewrite ^(/files/)(.*)$ /wp-content/uploads/sites/3/sites/3/$2 permanent; | |
#rewrite ^(/wp-content/blogs.dir/29/files/)(.*)$ /wp-content/uploads/sites/3/sites/3/$2 permanent; | |
location / { | |
# include /etc/nginx/naxsi.rules; | |
#try_files $uri $uri/ @wpmulti /index.php$is_args$args; | |
#try_files $uri $uri/ @wpmulti @wordfence /index.php$is_args$args; | |
try_files $uri $uri/ @wpmulti @memcached /index.php$is_args$args; | |
} | |
include /etc/nginx/common/locations.conf; | |
include /etc/nginx/common/wpcommon.conf; | |
# | |
# caching solutions | |
# | |
# include /etc/nginx/common/wordfence.conf; | |
include /etc/nginx/common/wpffpc.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment