Steps to change the default port number for Apache HTTP Server

We all know that as default the Apache HTTP Server will ping to port number 80 . What we have to do when a situation of changing this post number comes? Lets see some simple steps for this…

1. Assume that your new port number is 78

2. cp /etc/httpd/ports.conf /etc/httpd/ports.conf_backupgedit /etc/httpd/ports.conf

3. Find this line- Listen 80

4. Replace with the following line – Listen 78

5. Save the edited file

6. /etc/init.d/httpd restartApache HTTP server, Linux


Technorati : ,

Advertisements

25 thoughts on “Steps to change the default port number for Apache HTTP Server

  1. Alok Kumar

    We were also having problem in running apache server as IIS is already running at port:80 but we had changed the port to 81 in httpd.conf.
    We had changed the line “listen 80” to “listen 81”. It worked.

    Thanks,
    Alok Kumar
    eXtendCode

  2. Naim Hossain

    To the Admin of this site.

    I am novice to java networking. I got some helpful materials in this site but i could not save the html pages using Firefox 3.5.x.

    What might be the problem , plaese tell me.

    Thanks
    Naim

  3. Emily

    Hi,

    How can I change the port of virtual dedicated server. I want my tomcat to listen on port 80 and not the apache(Apache server is not running), So I did change on my server.xml but still i cannot get to port 80 where my tomcat is , is there any restrictions imposed by the Hosting provider, which is Godaddy in my case.

    Thanks,
    Emily

  4. Pascal Ramboz

    Hi guys,

    if you have “permission denied”, it means your user is not allowed to perform such action.
    So login as a root or admin user and you should be able to start your apache http server properly.

  5. Elleswara

    “/applications/tomcat/bin”>apachectl start
    (13)Permission denied: make_sock: could not bind to address [::]:78
    no listening sockets available, shutting down
    Unable to open logs

    I am inale to start the apche http server?? could you please help me out regardingthis.I changed the port numer from 80 to 78.

  6. pradeep

    Hi
    This is pradeep and i am having problm with the apache server .i am not able to start it ..whenever i try to start it,i get the reply as server busy….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s