Varnish: "Default Website Page" issue

guilhem

Registered
Nov 19, 2012
1
0
1
cPanel Access Level
Root Administrator
Hello there,

I installed Varnish and it's now listening to port 80 (I changed the Apache port and opened it in the firewall).

However it's not working yet because I now have the boring "Default Website Page" when I try to open a website.

Would someone have an idea of what I have to configure to make it work like before?

I'm new to Varnish, thanks :)
 

malcomn

Registered
Apr 16, 2013
2
0
1
cPanel Access Level
Root Administrator
I have the same problem.

If varnish is enabled, i can't access my website by domain, only direct by IP. Is redirected to cgi-sys/defaultwebpage.cgi or give 404 error.

Below are the changes I made in the configuration files

etc/varnish/default.vcl

Code:
backend default {
.host = "127.0.0.1";
.port = "8080";
}
etc/sysconfig/varnish

Code:
VARNISH_LISTEN_PORT=80
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
VARNISH_ADMIN_LISTEN_PORT=6082
VARNISH_STORAGE="malloc,${VARNISH_STORAGE_SIZE}"
httpd.conf

Code:
#Listen 0.0.0.0:80
Listen 127.0.0.1:8080
Currently http header

Code:
Accept-Ranges	bytes
Age	 0
Connection	keep-alive
Content-Length	3337
Content-Type	text/html
Date	 Tue, 16 Apr 2013 23:51:01 GMT
Server	 Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Via	 1.1 varnish
X-Varnish	1877918212
I will be very grateful if someone be able to help me.
 

malcomn

Registered
Apr 16, 2013
2
0
1
cPanel Access Level
Root Administrator
The solution i found is put varnish to listen port 8080 and following this tutorial:

/http://linuxaria.com/article/how-to-put-varnish-in-front-of-your-webserver-without-doing-any-change?lang=en

In etc/varnish/default.vcl file, change the host to external server ip.
 

s2s

Member
Nov 21, 2013
20
1
1
cPanel Access Level
Root Administrator
I have the same problem.

If varnish is enabled, i can't access my website by domain, only direct by IP. Is redirected to cgi-sys/defaultwebpage.cgi or give 404 error.

Below are the changes I made in the configuration files

etc/varnish/default.vcl

Code:
backend default {
.host = "127.0.0.1";
.port = "8080";
}
.....

I will be very grateful if someone be able to help me.
For future reference I managed to get past the [mysite]/cgi-sys/defaultwebpage.cgi issue by defining the dedicated IP of the host in etc/varnish/default.vcl

Example: mysite IP = 111.222.333.444

Code:
backend default {
.host = "111.222.333.444";
.port = "8080";
}