Skip to content

Instantly share code, notes, and snippets.

@guillaumemolter
Forked from rutger1140/gist:8548548
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaumemolter/e223a051ec7e2fe445c3 to your computer and use it in GitHub Desktop.
Save guillaumemolter/e223a051ec7e2fe445c3 to your computer and use it in GitHub Desktop.
Ressources to configure Plesk (11.5) with NGinx as the main webserver
### /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php ###
# 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;
gzip_vary on;
# end gzip configuration
location ~* ^/(.*\.(js|css|png|jpg|jpeg|gif|ico))$ {
expires 2w;
log_not_found off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment