DEV Community

Indra Wahyu
Indra Wahyu

Posted on

Change Port Apache2

You can change apache2 port with add the new port to /etc/apache2/ports.conf. Use nano or vim to edit file. This is my example, I want to change http port from 80 to 3000.

nano /etc/apache2/ports.conf
Enter fullscreen mode Exit fullscreen mode

Add the new port

Listen 3000
Enter fullscreen mode Exit fullscreen mode

Restart apache2

sudo service apache2 restart
Enter fullscreen mode Exit fullscreen mode

Open in browser http://localhost:3000

Top comments (0)