The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Varnish: "Default Website Page" issue

Discussion in 'General Discussion' started by guilhem, Nov 19, 2012.

  1. guilhem

    guilhem Registered

    Joined:
    Nov 19, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    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 :)
     
  2. malcomn

    malcomn Registered

    Joined:
    Apr 16, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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.
     
  3. hgrg

    hgrg Well-Known Member

    Joined:
    Oct 4, 2010
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    you need to configure vcl rules..
     
  4. malcomn

    malcomn Registered

    Joined:
    Apr 16, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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.
     
  5. s2s

    s2s Member

    Joined:
    Nov 21, 2013
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    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";
    }
    
     
Loading...

Share This Page