Author Topic: Disable varnish on xenforo 2  (Read 11545 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Disable varnish on xenforo 2
« on: December 06, 2018, 03:53:42 PM »
Hello, im trying to disable varnish on xf2, i try many things that i find on google but nothing works. i still have varnish on xf. Problem is that varnish doesent work ok with xenforo admin panel. he logout u as admin every time u click something in panel.

Offline
*
Re: Disable varnish on xenforo 2
« Reply #1 on: December 06, 2018, 04:38:04 PM »
Could you not use the "WebServers Domain Conf" in admin panel and set just that domains config to not use varnish, like i have some sites that use just apache, some that use nginx + varnish and some that use all three and never get any issues

Offline
*
Re: Disable varnish on xenforo 2
« Reply #2 on: December 06, 2018, 04:46:57 PM »
I have on same domain wordpress and /forum is xenforo... so i dont want to disable varnish for wordpress only for subfolder.

i try many things in /etc/varnish/ including in hosts i add

if (req.url ~ "^/\forum/") {
      return (pass);
   }

i try like everything that i find on net but it seems like it doesent apply... i even try to reboot machine after changes...


EDIT:

http://prntscr.com/lrlk2y
« Last Edit: December 06, 2018, 04:49:30 PM by MAMAC »

Offline
*
Re: Disable varnish on xenforo 2
« Reply #3 on: December 07, 2018, 09:06:23 AM »
I would say that maybe you can add the forum as a sub domain and change the config for just the forum forum example domain.com has varnish enabled and then forum.domain.com has a separate just apache ?

Offline
*
Re: Disable varnish on xenforo 2
« Reply #4 on: December 07, 2018, 10:32:48 AM »
that is a last solution to change to subdomain :P

Offline
*
Re: Disable varnish on xenforo 2
« Reply #5 on: December 07, 2018, 12:03:11 PM »
that is a last solution to change to subdomain :P

i get that, after doing a bit of googling people are saying that it could take some time for it to take effect etc, try restarting the server or at least varnish Apache etc and of course make sure you dont have a cached version of the site, try also using the full path the the folder maybe i dont know exactly but here is what i read.

https://stackoverflow.com/questions/49012502/how-to-make-varnish-not-cache-a-certain-folder

Offline
**
Re: Disable varnish on xenforo 2
« Reply #6 on: December 08, 2018, 10:22:46 AM »
I have on same domain wordpress and /forum is xenforo... so i dont want to disable varnish for wordpress only for subfolder.

i try many things in /etc/varnish/ including in hosts i add

if (req.url ~ "^/\forum/") {
      return (pass);
   }

i try like everything that i find on net but it seems like it doesent apply... i even try to reboot machine after changes...


EDIT:

http://prntscr.com/lrlk2y

try pipe instead of pass
Code: [Select]
if (req.url ~ "^/\forum/") {
return (pipe);
}