uk01

Well-Known Member
Dec 31, 2009
232
35
78
Hi I know Cpanel doesn't support Varnish but has anyone got around this issue...

We have a magento 2 site hosted on a cpanel server and we have set up a separate varnish/nginx server.
It's all working but when we enter the host ip Varnish backend tries to get the site from /var/www/html

I understand this is because /var/www/html is the default web root for the ip address, is there any way of symlinking to the real web root in home/user/public_html?

If not, I assume giving the account a dedicated ip address is the only way (but even that won't work with an add on domain)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,498
1,970
363
cPanel Access Level
Root Administrator
Hey there! /var/www/html shouldn't be used for any active websites on the system, as that holds the "default" vhost and error pages. I wouldn't recommend trying to symlink that as that will just cause errors with the hostname, the hostname SSL, and various cPanel functions.
 

uk01

Well-Known Member
Dec 31, 2009
232
35
78
Good point!

I’ve managed to use a second subdomain linked to the same webroot, still have backend fetch issues butno longer relating to var/web/html
 
  • Like
Reactions: cPRex