Custom Nginx WordPress VirtualHost template with Nginx fastcgi_cache for Plesk Onyx
MIT License
Custom template compatible with stock Nginx package shipped by Plesk, available here : nginx-stock
git clone https://github.com/VirtuBox/plesk-nginx-fascgi-cache-template.git /usr/local/psa/admin/conf/templates/custom
cp -f /usr/local/psa/admin/conf/templates/custom/nginx-conf/* /etc/nginx/conf.d/
nginx -t && service nginx reload
# let plesk detect custom template
plesk repair web -n
# rebuild vhost with custom template
plesk repair web -y -domains-only
Disable Proxy mode in Plesk > Yourdomain.tld > Apache & nginx Settings
Enable Nginx cache in Plesk > Yourdomain.tld > Apache & nginx Settings
Login into WordPress & install Nginx-helper plugin
In Nginx-helper Settings, Enable Purge
Just run :
git -C /usr/local/psa/admin/conf/templates/custom pull origin master
And relaunch plesk repair web to apply changes :
# let plesk detect custom template
plesk repair web -n
# rebuild vhost with custom template
plesk repair web -y -domains-only