Ashish Aggarwal Ashish Aggarwal - 1 year ago 112
Apache Configuration Question

Binding IP in apache

Actually I am a beginner to the concept of virtualhost in apache so forgive me if I am being silly here. My question is :-

Is there a way that I can bind apache to listen on public IP/network interface of other server like


Generally we use :

Listen 80

Answer Source

If you have multiples IP addresses on the one machine (e.g. multiple NIC cards) then you can use that syntax to have Apache, or certain vhosts in Apache, to only listen on one. For example you could have one vhost serving a site on one IP address and another vhost serving a different site on a different IP address which also resolves to that server. If you do not supply an IP address but just a port then Apache will listen to all IP addresses.

What you cannot do is use that syntax to steal network traffic for an IP address associated with another server - to do that Apache would need to be running on the server that IP address is associated with.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download