How to change Apache Httpd default port in Linux?
Find out how to change Apache Httpd default port in Linux from the default 80.
I was working with Apache server and I used it as a web server for Bugzilla. But I didn’t want it to use the default port 80. I wanted to assign a specific port for Bugzilla. Please follow these steps to change Apache Httpd default port in Linux from the default 80.
sudo vi /etc/httpd/conf/httpd.conf
Add the port
# # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 184.108.40.206:80 Listen 80 Listen 8010
Restart Apache web Server
Add your port after the line Listen 80. You also need to change the port number in <VirtualHost> tag in your application’s configuration too.
sudo systemctl start httpd.service