Change Apache ports Ubuntu


How to change apache2 ports

Open up a Terminal and run the following command.

#sudo pico /etc/apache2/ports.conf

Now, inside this file you should see something like the following:

NameVirtualHost *:80

Listen 80

If you want to change the default apache port completely simply change “Listen 80″ to what you need, for example “Listen 1337″. If you want to add another port while keeping port 80 open, you can simply add another line for example:

NameVirtualHost *:80

Listen 80

Listen 1337

Then edit default file

#sudo pico /etc/apache2/sites-available/default
and change <VirtualHost *:80> to the new port

Last thing you have to do now is restart Apache.

#sudo /etc/init.d/apache2 restart

No comments:

Post a Comment