Apache on a different port

Discussion in 'Server Management' started by Zeen, Feb 15, 2014.

  1. Zeen

    Zeen Administrator Staff Member

    Sometimes you want Nginx to run on port :80, and you then need to change the port for Apache. You can simply edit it in the “Tweak Settings” page in WHM, replacing 0.0.0.0:80 with 0.0.0.0:81 or, doing it command line way, edit /var/cpanel/cpanel.config and change port 80 in apache_port assignment to 81:

    Code:
    apache_port=0.0.0.0:81
    Run /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings as advised at the top of that file.
    Check /usr/local/apache/conf/httpd.conf for any occurences of port 80, and run /scripts/rebuildhttpdconf to make sure httpd.conf is up to date.
     

Share This Page