Change Apache Port Number

In ubuntu we need to change the /etc/apache2/ports.conf file.

sudo vim /etc/apache2/ports.conf
Listen 80

Change the port to listen on something other than 80.

Listen 8080


/etc/apache2/port.conf should now look similar to this.

#file: /etc/apache2/port.conf 
Listen 8080 
Listen 443

 

Edit VirutalHost Files

Update your virutal host files to use port 8080 as well.

<virtualhost> 
#..... 
</virtualhost>

Restart Apache

sudo service apache2 restart
Cookbook Category: 

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.