How does one start varnishd to listen on multiple ports?

Paul A. Procacci pprocacci at datapipe.com
Thu Jun 9 01:57:20 CEST 2011


>From the documentation:

###########################################
       -a address[:port][,address[:port][...]
              Listen for client requests on the specified  address  and  port.
              The  address  can  be  a  host  name (alocalhosta), an IPv4 dot-
              ted-quad (a127.0.0.1a), or an IPv6 address  enclosed  in  square
              brackets  (a[::1]a).  If address is not specified, varnishd will
              listen on all available IPv4 and IPv6 interfaces.   If  port  is
              not  specified, the default HTTP port as listed in /etc/services
              is used.  Multiple listening addresses and ports can  be  specia
              fied as a whitespace- or comma-separated list.
###########################################

What you want is to separate ports by a comma.  Each addition 'a' flag replaces the first.

~Paul

On Wed, Jun 08, 2011 at 04:51:49PM -0700, Mike Gracy wrote:
> I have -a 0.0.0.0:8080 -a 0.0.0.0:9010 in the /etc/default/varnish but
> it will only listen on 9010.
>
>  DAEMON_OPTS="-a 0.0.0.0:8080 \
>               -a 0.0.0.0:9010 \
>               -T localhost:2000 \
>               -f /etc/varnish/default.vcl \
>               -n $INSTANCE"
>
> I have the same problem when running it from the command line.  It
> only starts listening on the last port listed.
> If I start two separate instances, changing the port and -n values, it works.
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

________________________________

This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/about-us-legal-email-disclaimer.htm for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.




More information about the varnish-misc mailing list