Search code examples
phpapache.htaccessvarnishvarnish-vcl

Installing Varnish Cache 4 on Cpanel Server


I have successfully installed varnish on my VPS and configured it to listen on port 80 with Apache listening on port 8080. When I try accessing any domain name such as www.mydomain.com I get redirected to www.mydomain.com//cgi-sys/defaultwebpage.cgi

Solutions I tried... Clearing browser cache Commenting out the redirect in /usr/local/apache/htdocs/index.html (this result in a blank screen.) removed .htaccess (no luck).

Any suggestions?


Solution

  • Simply don't use Varnish + Cpanel. It will never work properly until eventually you will realize you have to get rid of Cpanel.

    Cpanel limits you in the way you can configure and maintain your server.

    Get rid of it, really. Start from bare bones Linux OS installation and install Varnish + Nginx which is already a much better stack than what Cpanel provides.