Skip to content
Custom Nginx WordPress VirtualHost template with Nginx fastcgi_cache for Plesk Onyx
Branch: master
Clone or download
Latest commit 2314457 Feb 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
domain another fix for cache purging Feb 15, 2019
nginx-conf fix doublon Jan 19, 2019
LICENSE Create LICENSE Feb 17, 2019
README.MD
nginx.conf fix fastcgi_cache purge Jan 19, 2019

README.MD

Nginx Fastcgi_cache custom template for Plesk Onyx

Features

  • Override default Nginx virtualhost template to work with WordPress in mode "Nginx Only"
  • set fastcgi_cache bypass rules globally on the server using the directive map instead of several "if".
  • add support for Nginx fastcgi_cache purge with Nginx-helper
  • Bypass cache on cookies or request_uri
  • add webp image rewrite support
  • Deny access to hidden files and directory (.git, .htaccess, etc ..)

Requirements

  • Nginx compiled with Nginx_cache_purge module : You can use nginx-ee to compile Nginx

Limitations

  • Custom rules to bypass cache set in Plesk are not applied
  • fastcgi_cache template work only for wordpress

How to use this template

  1. Clone the repository
git clone https://github.com/VirtuBox/plesk-nginx-fascgi-cache-template.git /usr/local/psa/admin/conf/templates/custom
  1. Copy Nginx configuration in Nginx conf.d directory
cp -f /usr/local/psa/admin/conf/templates/custom/nginx-conf/* /etc/nginx/conf.d/
  1. Reload nginx
nginx -t && service nginx reload
  1. Apply new nginx virtualhost template
plesk repair web
  1. Disable Proxy mode in Plesk > Yourdomain.tld > Apache & nginx Settings

  2. Enable Nginx cache in Plesk > Yourdomain.tld > Apache & nginx Settings

  3. Login into WordPress & install Nginx-helper plugin

  4. In Nginx-helper Settings, Enable Purge

How to update this template

Just run :

git -C /usr/local/psa/admin/conf/templates/custom pull origin master

And relaunch plesk repair web to apply changes :

plesk repair web
You can’t perform that action at this time.