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)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more