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)
- 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
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018
- Online training on Linux Bash shell scripting - February 8, 2018