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 cannot connect to Apache on 127.0.0.1

Discussion in 'EasyApache' started by John_B, Aug 8, 2011.

  1. John_B

    John_B Registered

    Joined:
    May 27, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have been running Varnish on my cPanel server for some time with no problems as frontend, with Apache (built with EasyApache) as backend. However, running Varnish as user 'varnish', when it is instructed to connect to Apache on 'localhost' or 127.0.0.1 it cannot connect to Apache. When instructed to connect to Apache on my server's external IP address, it connects.

    Can you suggest why this might be?

    Also users other than root cannot ping 127.0.0.1, they get:
    icmp open socket: operation not permitted

    I am not sure whether the reason Varnish cannot connect to Apache on 'localhost' is a problem with the 'varnish' user permissions, or with httpd cofiguration?
     
    #1 John_B, Aug 8, 2011
    Last edited: Aug 8, 2011
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  3. John_B

    John_B Registered

    Joined:
    May 27, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    OK thanks.

    That does not explain why Varnish, running on the same server as Apache, can connect to Apache on the external IP address but not on localhost or 127.0.0.1.
     
    #3 John_B, Aug 8, 2011
    Last edited: Aug 8, 2011
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What specific connection string is it using for 127.0.0.1 or localhost?

    Of note, Varnish isn't supported by cPanel at this time and this is the cPanel forum. It is probably most beneficial to utilize their forum to ask these questions:

    https://www.varnish-cache.org/forum
     
Loading...

Share This Page