Skip to content

Instantly share code, notes, and snippets.

View mbrughi's full-sized avatar

Marco Brughi mbrughi

View GitHub Profile
@mbrughi
mbrughi / .htaccess
Last active May 5, 2022 14:05 — forked from jacobovidal/.htaccess
Upgrade Insecure Requests via .htaccess or meta tag to prevent mixed content
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>
@mbrughi
mbrughi / gist:b88fd3dbc9d7953cb148f1a471b4a946
Last active September 30, 2022 14:13 — forked from rutger1140/gist:8548548
Plesk Obsidian 18.0.46 nginx (tested) configuration settings for WordPress (not valid for all websites... please test first) | Put inside domain "Hosting & DNS" ---> "Apache & nginx settings"
# Source: https://www.websavers.org/how-to-speed-up-wordpress/
rewrite !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3|eot|svg|ttf|woff|otf|txt|swf)$ /index.php break;
rewrite /wp-admin/$ /wp-admin/index.php break;
rewrite /$ /index.php break;
# enable gzip compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/xml text/css;