How to do the nginx.conf on a vps?
-
I have a VPS running nginx with a few wordpress sites. Currently two are using your plugin, the others you the standard cloudflare plugin.
There is a page “Nginx Settings > Browser caching rules”
location ~* \.(xml|xsl)$ { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location /robots.txt { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location /wp-cron.php { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location = /wp-content/wp-cloudflare-super-page-cache/web.site/debug.log { access_log off; deny all; }
Do I add it here:
/etc/nginx/nginx.conf
?And since nginx.conf is for all sites on this server, will it interfere with the `others? And do I need to add like:
location = /wp-content/wp-cloudflare-super-page-cache/web1.site/debug.log { access_log off; deny all;
location = /wp-content/wp-cloudflare-super-page-cache/web2.site/debug.log { access_log off; deny all;
location = /wp-content/wp-cloudflare-super-page-cache/web3.site/debug.log { access_log off; deny all;`I think this question might be FAQ worthy ??
With putting them in
/etc/nginx/nginx.conf
inside http{} tag nginx will not restart.
- The topic ‘How to do the nginx.conf on a vps?’ is closed to new replies.