Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VirtuBox/plesk-nginx-fascgi-cache-template
Custom Nginx WordPress VirtualHost template with Nginx fastcgi_cache for Plesk Onyx
https://github.com/VirtuBox/plesk-nginx-fascgi-cache-template
fastcgi-cache nginx nginx-configuration plesk plesk-nginx plesk-onyx wordpress
Last synced: 14 days ago
JSON representation
Custom Nginx WordPress VirtualHost template with Nginx fastcgi_cache for Plesk Onyx
- Host: GitHub
- URL: https://github.com/VirtuBox/plesk-nginx-fascgi-cache-template
- Owner: VirtuBox
- License: mit
- Created: 2018-11-10T15:42:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T16:49:39.000Z (over 1 year ago)
- Last Synced: 2024-10-19T07:53:21.110Z (26 days ago)
- Topics: fastcgi-cache, nginx, nginx-configuration, plesk, plesk-nginx, plesk-onyx, wordpress
- Language: PHP
- Homepage:
- Size: 29.3 KB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://virtubox.github.io/nginx-ee/) to compile Nginx
**Custom template compatible with stock Nginx package shipped by Plesk, available here** : [nginx-stock](https://github.com/VirtuBox/plesk-nginx-fascgi-cache-template/tree/nginx-stock)
## 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
```bash
git clone https://github.com/VirtuBox/plesk-nginx-fascgi-cache-template.git /usr/local/psa/admin/conf/templates/custom
```2) Copy Nginx configuration in Nginx conf.d directory
```bash
cp -f /usr/local/psa/admin/conf/templates/custom/nginx-conf/* /etc/nginx/conf.d/
```3) Reload nginx
```bash
nginx -t && service nginx reload
```4) Apply new nginx virtualhost template
```bash
# let plesk detect custom template
plesk repair web -n
# rebuild vhost with custom template
plesk repair web -y -domains-only
```5) Disable Proxy mode in Plesk > Yourdomain.tld > Apache & nginx Settings
6) Enable Nginx cache in Plesk > Yourdomain.tld > Apache & nginx Settings
7) Login into WordPress & install [Nginx-helper](https://wordpress.org/plugins/nginx-helper/) plugin
8) In Nginx-helper Settings, Enable Purge
## How to update this template
Just run :
```bash
git -C /usr/local/psa/admin/conf/templates/custom pull origin master
```And relaunch plesk repair web to apply changes :
```bash
# let plesk detect custom template
plesk repair web -n
# rebuild vhost with custom template
plesk repair web -y -domains-only
```