Q. Change the port number of Apache web server in Linux and Unix?
When ever a network service is started it starts listening on particular port. For example DNS server listen on 53 UDP and TCP port and Telnet server listen on 23 port. For more service and port mapping for different Linux service please click here
Some times we have to change the port for some services such as Apache so that they start listening on the port.
To change the port of Apache we have to edit httpd.conf which is located in /etc/httpd/conf in most Linux distributions. Open httpd.conf file and search for the word Listen. This Listen entry is to inform Apache where to listen for incoming http packets so that Apache can start processing the http packets.
Now change the port assigned to what ever port you want.
Changing the port to 443 in httpd.conf file.
Once you edited the httpd.conf file save and exit it.
Start the Apache service to take this change live. Now try to access website with mention port.
Latest posts by Surendra Anne (see all)
- Docker: How to copy files to/from docker container - June 30, 2020
Anisble: ERROR! unexpected parameter type in action:
Fix- June 29, 2020
- FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018