• Resolved filz51

    (@filz51)


    When I build my Webserver with Apache only I control the response headers for two specific image resources from a webcam to be reloaded every time with max-age=0 and Expires 0 in htaccess –> everything works fine.

    When I build the webserver with Nginx-Varnish-Apache I get
    cache-control: max-age=315360000
    expires: Thu, 31 Dec 2037 23:55:55 GMT
    x-cache: HIT from Backend

    Where do I have to make modifications in the configs to get expires: 0 and max-age=0 in the header responses for files located in /home/user/public-html/webcam/?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Can you confirm if you are using Nginx as a proxy with some rules to load and cache static files from Nginx directly?
    We don’t support Nginx as proxy yet.

    Thread Starter filz51

    (@filz51)

    Hi Marko

    Thanks for hooking in. I only had to edit the Nginx config for my vHost . Now I have a MISS instead of HIT and the Ressourcen are loaded from the backend. Success! I added:

    	location / {
    
    location = /webcam/small.jpg {
      expires 0;
    try_files $uri @backend;
    	}
    location = /webcam/neu.jpg {
      expires 0;
    try_files $uri @backend;
    	}

    There was an existing rule for location / already in which the rule had to be integrated. There must be a way to combine the two rules in only one but I’m not sure how the server is productive so I don’t want make experiments.
    But could I have done these adjustments also in nginx.conf (from W3TC ini-Folder) that I placed in the WP root?
    BTW: Where should I place varnish-(sample)-config from W3TC ini Folder? It’s not mentioned here: https://github.com/W3EDGE/w3-total-cache/wiki/FAQ:-Installation:-Varnish-Server

    Cheers

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    As this is specific for your installation and not in general, we need to investigate this. In order to do so, I can offer you our Professional support. If you chose this please go to your wp dashboard, Performance>Support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bypass caching for specific files with Nginx-Varnish-Abache-W3TC-Setup’ is closed to new replies.