Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Nginx caching when it shouldn't?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
frankbarmentlo
Posts: 2
Joined: Wed Aug 22, 2018 7:37 pm

Os: Ubuntu 15x
Web: nginx + php-fpm
Nginx caching when it shouldn't?
  • Quote

Post by frankbarmentlo » Wed Aug 22, 2018 8:31 pm

I have been running VestaCP for a couple of websites.

Server: Ubuntu 16.04 Server
Setup: NGINX + Apache2
Web Template: APACHE2
Proxy Support: Disabled

One of my sites is just a folder hosting a couple of files (text and text/x-sh) used in cron jobs & automated tasks for which I disabled Nginx caching.
I changed one of these scripts, and put it on the website and checked the file through my browser. It did not update, but it took ~10 minutes before changes were visible. I expected it to be immediate.

During other tests, I had to run the following command to have my changes applied:
service nginx stop && rm -rf /var/cache/nginx/ && service nginx start

If I comment the line "proxy_ignore_headers Expires Cache-Control;" in /etc/nginx/nginx.conf and restart Nginx, files are updated immediatly as expected.
This is odd,as I am sure NGINX is disabled for this site and it should NOT be cached..

I edited my nginx template to add the template name as a header so I can see which template is still active.. but sadly it did not help: headers are not appended after disabling the templates (tested them all to see if headers were added with Proxy support active)

Does anybody know how to fix this? IT would really speed up my workflow if i can just push to the webserver without having to login through SSH and empty the NGINX-cache.
Top

frankbarmentlo
Posts: 2
Joined: Wed Aug 22, 2018 7:37 pm

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Nginx caching when it shouldn't?
  • Quote

Post by frankbarmentlo » Wed Aug 22, 2018 9:13 pm

I created a work-around by moving the line proxy_ignore_headers Expires Cache-Control;" from /etc/nginx/nginx.conf to the template files.
I'd rather see Nginx not caching when there's no template selected though..
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password