Skip to main content

How To Change the port apache

Comments

7 comments

  • Jcats
    Don't modify apache conf directly. You can change it in
    WHM > Tweak Settings > Apache non-SSL IP/port
    As far as your sites not working, your browser will automatically try and use port 80 so if you change to port 82 then make sure you are specifying port 82 like so:
    0
  • 24x7server
    Hi, On the cPanel server, doing this directly from the tweak setting is the most suitable method. You can refer to the below documentation link for more details: Tweak Settings - System - Documentation - cPanel Documentation
    0
  • rootsys12
    Don't modify apache conf directly. You can change it in
    WHM > Tweak Settings > Apache non-SSL IP/port
    As far as your sites not working, your browser will automatically try and use port 80 so if you change to port 82 then make sure you are specifying port 82 like so: http://domain.com:82 ** I should also add, if you have a firewall, port 82 might be closed so you will need to open it up for incoming.

    Unfortunately it does not work if it is changed like this The site does not work
    0
  • rootsys12
    Hi, On the cPanel server, doing this directly from the tweak setting is the most suitable method. You can refer to the below documentation link for more details:
    0
  • Jcats
    Are you specifying the port in your browser after changing the port? Is the new port opened in your firewall?
    0
  • 24x7server
    The same thing has been implemented and the sites do not work

    The reason I can see for this to nor work would probably be because the new port is not listening properly. There are things that I would like you to conduct on your end: 1. From your machine, try executing telnet to the server IP on the new Apache port. eg: if you have new port as 82, use the below command: # telnet 82 Check if the above command does indeed allows you to connect and if it does not connect, then you will have to allow this new port in the firewall to allow traffic to it.. 2. Check the output of the below command on your server.. # netstat -anpt | grep :82
    0
  • cPanelMichael
    Hello, The previous posts are correct. Note that you'd need to append the port number (e.g. :82) to the end of your URL in your web browser to load the domain name over the custom port after making the change. Thank you.
    0

Please sign in to leave a comment.