Knowledge Base

Allows you to search a variety of questions and answers

Search

Search results

Apache

To do this, you need to edit the following line in httpd.conf file:

Listen 0.0.0.0:80 which means that currently Apache listens to all Ips on that port. 

As an example, lets assume you have 3 IPs: 1.1.1.1, 2.2.2.2 and 3.3.3.3. You have a service that needs port 80 and you want it to run on IP 2.2.2.2. To achieve this, you will make the following change to the Listen directive:

Listen 1.1.1.1:80
Listen 3.3.3.3:80
Listen 127.0.0.1:80 

This will make Apache only listen to those 2 IPs. If you have more IPs, you need to manually add Listen directives for them and restart Apache. The last line will allow Apache to listen on localhost port 80 and thus, with Cpanel for example, allow it to check that it's running.

You will also need to comment out the following line:

# NameVirtualHost *

Then restart Apache after the above changes were made. You can now run your application on the IP (2.2.2.2 from example above) on port 80 alongside Apache. 

This is a great trick for streaming with something like IceCast where a lot of users are behind firewalls and a lot of non-standard ports are blocked.

See What Our Customers Say