Secure port for connecting Apache webserver is 443. If you want to change default Apache port from 80 then you can follow below steps:
We are here using vi editor to update this file, you can use any other editor.
Output will be this:-
You can enter the value which you want to update.
- Login to your server with root access.
We are here using vi editor to update this file, you can use any other editor.
Code:
vi /etc/httpd/conf/httpd.conf
- You can search with grep command to find value:
Code:
grep Listen /etc/httpd/conf/httpd.conf
Code:
Listen 0.0.0.0:80 ---------------> This for non SSL port
Listen [::]:80
Code:
Listen 0.0.0.0:443----------------> This is for SSL port
Listen [::]:443
- Now restart Apache with below command:
Code:
service httpd restart
OR
/etc/init.d/httpd restart