How to Change Apache's Default HTTP Port on Linux (Debian/Ubuntu)
HardReset.InfoDecember 31, 20254 min11 views
4 connectionsΒ·7 entities in this videoβVerifying Apache Status and Default Port
- π― Verify Apache 2 status using
sudo systemctl status apache2to ensure it's active and running. - π‘ Test the default HTTP port (80) by navigating to
http://localhostorhttp://localhost:80in your browser to confirm Apache is accessible.
Editing Apache Configuration File
- π οΈ Access the Apache configuration file by using the command
sudo nano /etc/apache2/ports.conf. - π Locate the
Listen 80directive within theports.conffile.
Changing and Restarting Apache Service
- β‘ Modify the
Listendirective from80to your desired port, for example,7000. - πΎ Save the changes by pressing
Ctrl+O,Enter, and exit the editor withCtrl+X. - π Restart the Apache service to apply the changes with
sudo systemctl restart apache2.
Verifying the New Port Configuration
- β
Confirm that Apache is running again using
sudo systemctl status apache2. - π Test the new port by accessing
http://localhost:7000in your browser to ensure Apache is now listening on the custom port.
Knowledge graph7 entities Β· 4 connections
How they connect
An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.
Hover Β· drag to explore
7 entities
Chapters2 moments
Key Moments
Transcript16 segments
Full Transcript
Topics10 themes
Whatβs Discussed
Apache HTTP ServerApache2LinuxHTTP Portports.confListen DirectivesystemctlDebianUbuntuTerminal Commands
Smart Objects7 Β· 4 links
ProductΒ· 1
LocationΒ· 1
ConceptsΒ· 5