lamp-ubuntu

You might want to read first, a previous tutorial on how to Install a LAMP Server on Debian 6.0.6 Squeeze.

In todays tutorial, I'll explain how to change the default LAMP Port from 80 to something else. Suppose you have skype installed or some other application that uses port80 and conflicts with LAMP, this tutorial comes in handy.

A successful LAMP installation shows LAMP running on localhost / some other IP configured on your server like this:

5

By default LAMP on Debian installs with Apache2 located at directory: /etc/apache2.

To change the default port, two files need to be edited. Note: you would need to edit them as a root-user.

a) ports.conf located here: /etc/apache2/ports.conf

Look for: Listen 80, and change it to: Listen 8080.

Save and close the file.

b) 000-default located here: /etc/apache2/sites-enabled/000-default

At the top of the page, you'll find this: VirtualHost *:80

Change it to: VirtualHost *:8080

save and close the file.

Lastly:

Reload apache2 with command: service apache2 reload

Restart apache2 with command: service apache2 restart

Test LAMP with the new port number 8080:

127.0.0

 

Note: the port-number could be something else as crude or "unique" as 12345

127.0.0

thats all folks.

questions and comments are welcome.

Add comment


Security code
Refresh