You can set Varnish to connect to any
port when you set your backend directive. As far as Varnish on
Port 80, that is always required for a webserver, unless you want
a URL that needs to specify a port (ie:
http://www.example.com:81
- or whatever port you want).
Make sure you have Apache listening on port 8080 in your Apache
config. You really don't need to open up that port in IPTables,
since it is a local connection between Varnish and Apache, but you
do need to make sure that Apache is also listening on localhost.
To make sure Apache is listening on the proper port, go into a
command line and type:
lynx localhost:8080.
That will bring up the text web browser Lynx. If it isn't
installed, go ahead and install it with apt-get, yum or whatever
package installer you have. All major distributions have it open.
That will tell you if the webserver is actually able to connect to
Apache or not.
Also make sure that Apache isn't also trying to listen on port 80.
Look at the listen directive in your apache config file. So you
want listen like this:
Listen 127.0.0.1:8080.
If you're using virtual hosts, make sure to specify the port in
the VHost declaration:
<VirtualHost *:8080>
What you're trying to achieve is having all connections to Apache
go through Varnish, as Varnish functions as a proxy server to
Apache.
Jamie Holly
http://www.intoxination.net
http://www.hollyit.net
On 3/17/2013 2:13 AM, Kamal Palei wrote: