Changing Http default port number

 

Changing Http default port number

 

 

 

 

 

 

 

            Changing Apache http portnumber is used to secure your web sites. If you wish that only some people need to acces your site or link you can go for the option of changing the default port number form 80 some other. Lets see how to change the default port number of http in linux.

          By default the port number of Http is “80” and i am going to change it in to “5555”

Open the Http configuration file and check the http port number
#vi /etc/httpd/conf/httpd.conf
(After opening the file use :/Listen 80 to go to the line directly)

 

Now change the port number from 80 to 5555
#vi /etc/httpd/conf/httpd.conf
(Change the port number 80 to 5555)

 

Restart the http service and check 5555 port is listening to http

To restart the service use the below command

#/etc/init.d/httpd restart

TO check http is listen on port 5555 use below command

#netstat -ntpl | grep 5555

 

Now access the web page through web

Open the browser and in the address bar give like below

http://<YOUR-IP>:<PORT NUMBER>