How to change the port number of Apache Web Server?
Default port to access the Apache is 80. Secure port for communicating with world for Apache is 443. Very frequently, we need to update the Apache port. Here is procedure to update the Apache port number on Linux server.Steps -1. SSH to your server. Please make sure, you have root access to server. Without root access, you can not proceed with it.2. Now, you will need to update the Apache configuration file. Apache configuration file is present at this location -
You can use any file editor with which you are comfortable to update the file -vi /etc/httpd/conf/httpd.conf3. Search for the listen value in Apache configuration file. You can use blow command to find it -
grep Listen /etc/httpd/conf/httpd.conf
Output will be as follow -
Listen 0.0.0.0:80 ---------------> This for non SSL port
Listen 0.0.0.0:443----------------> This is for SSL port
Listen [::]:443You can update the Listen value to the port number which you would like to update.
4. Restart the Apache Service after updating the port number. You can use any of the below command to restart the service -
service httpd restart
Was this answer helpful?
LAMP stands for Linux, Apache, MySQL, and PHP. It is nothing but Linux operating system with...
1. REMOVE MAILS BY ID - /usr/sbin/exim -v -Mrm (MAIL ID HERE) 2. LIST QUEUED MAILS -...
Finding the username from provided hosting service name - /script/whoowns domain_name Finding...
Note - You can replace /home with correct '/' drive on your server. 1. Checking the disk usage -...
1. Backup database:#mysqldump -u username -p[username_password] databasename >...