Question

While Apache Listing to Port 8080 - Website is Not Working

I have successfully installed varnish cache on Cpanel + Centos 6.5 + Apache. While I changed the Apache port from 80 to 8080, my website stop functioning. However, While I switch back to default Port 80 then Website start responding. Varnish cache is installed and listing to port 80.

I did below mention steps to install varnish.

yum install -y gcc make automake autoconf libtool ncurses-devel libxslt groff pcre-devel pckgconfig libedit libedit-devel

rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release/varnish-release-3.0-1.el6.noarch.rpm

yum install varnish

Please help me on this.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

My Setting is

 nano -w /etc/sysconfig/varnish

Not setting VARNISH_LISTEN_ADDRESS makes Varnish listen on all IPs on this box

(Both IPv4 and IPv6 if available). Set manually to override this.

VARNISH_LISTEN_ADDRESS=

VARNISH_LISTEN_PORT=80

Telnet admin interface listen address and port

VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 VARNISH_ADMIN_LISTEN_PORT=6082

nano -w /etc/varnish/default.vcl

backend default { .host = “127.0.0.1”; .port = “8080”; }

I am using apache 2.4 php 5.5 cpanel centos 6.5 64X

What i have to do next

Did you configure varnish to use localhost:8080 as backend?

also remember to restart both services after changing the config files.

Sounds like iptables. What does “iptables -L” return. Probably port 80 is open but port 8080 is not.