Name
Listen
Synopsis
Listenhostname
:port
Server config
Listen
tells Apache to pay attention to more than
one IP address or port. By default, it responds to requests on all IP
addresses, but only to the port specified by the
Port
directive. It therefore allows you to
restrict the set of IP addresses listened to and increase the set of
ports.
Listen
is the preferred directive;
BindAddress
is obsolete, since it has to be
combined with the Port
directive if any port other
than 80 is wanted. Also, more than one Listen
can
be used, but only a single BindAddress
.
There are some housekeeping directives to go with these three:
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.