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
# Enable pagespeed module by putting the following in http context | |
pagespeed on; | |
pagespeed Domain example.com; | |
pagespeed DownstreamCachePurgeLocationPrefix http://lb1.i; | |
pagespeed DownstreamCachePurgeMethod PURGE; | |
pagespeed DownstreamCacheRewrittenPercentageThreshold 95; | |
# This setting should be enabled when using HTTPS |
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
# Based on articles: | |
# https://ruhighload.com/%D0%9A%D1%8D%D1%88%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D1%81+nginx | |
# https://wiki.enchtex.info/practice/nginx/cache | |
# https://gist.github.com/yanmhlv/5612256 | |
# https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html | |
# https://blog.runcloud.io/2017/10/28/nginx-caching-tutorial-wordpress.html | |
# https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps | |
# https://easyengine.io/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/ | |
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
# check if there is a file named maintenance.html | |
# so when you want to disable maintenance mode just remname "mv maintenance.html maintenance.html.disabled" | |
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ /maintenance.html [R=503,L] | |
ErrorDocument 503 /maintenance.html |