Limit Apache to a single IP

Solution 1:

Apache binds to everything by default, even if you specify certain IP('s) to run NameVirtualHost on.

Add this in your ports.conf:

Listen 192.168.0.82:80

Reference: http://httpd.apache.org/docs/2.2/bind.html

Solution 2:

Look in the /etc/apache2/ports.conf file.

You'll find a directive like:

Listen 80

The comment on CentOS boxes describes this option:

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80

For what you want, change the Listen 80 line to Listen 192.168.0.82:80.

You are not able to start Apache right now because it is attempting to bind to port 80 on all interfaces (the 0.0.0.0 designation), and you have node listening on 192.168.0.83:80.

The IP in the virtual host blocks means that that particular virtual host will respond on requests coming in on that IP address. It doesn't specify how Apache will bind to the interfaces it sees.

Solution 3:

Listen directive is what you're looking for:

Listen 192.168.0.82:80

More info in documentation.