Skip to content

Instantly share code, notes, and snippets.

View mrbrazzi's full-sized avatar

Mr. Brazzi mrbrazzi

View GitHub Profile
mrbrazzi / ngxpagespeed.conf
Created July 4, 2020 04:38 — forked from hendra/ngxpagespeed.conf
Nginx Pagespeed Configuration
# Enable pagespeed module by putting the following in http context
pagespeed on;
pagespeed Domain;
pagespeed DownstreamCachePurgeLocationPrefix http://lb1.i;
pagespeed DownstreamCachePurgeMethod PURGE;
pagespeed DownstreamCacheRewrittenPercentageThreshold 95;
# This setting should be enabled when using HTTPS
mrbrazzi / nginx_with_cache.conf
Created April 19, 2020 04:47 — forked from Friz-zy/nginx_with_cache.conf
Nginx cache example config
# Based on articles:
mrbrazzi / .htaccess
Created July 8, 2018 22:25 — forked from hasantayyar/.htaccess
Maintenance page redirection with htaccess
# 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