Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Configure apache to listen on port other than 80

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 1.18k
    Comment on it

    For enabling server to listen on different ports we can make the changes in file port.conf in Debian/Ubuntu based linux server. The path where we can find the ports.conf file is below:

    1-> Debian/ Ubuntu :   {  /etc/apache2/ports.conf } 
    

    let us say we want Apache2 to listen on port 8181 instead of 80. Here we will change the configuration option as below:

    Listen 8181

    We can also enable Apache2 to listen on both ports 80 and 8181 with the following changes:

    Listen 80

    Listen 8181

    In this way we can enable Apache2 to listen on as many port as per the requirement. After we are done with the above changes, restart Apache2 server:

    sudo service apache2 restart
    

    For enabling server to listen on different ports we can make the changes in file httpd.conf in Centos/Fedora based linux server. The path where we can find the httpd.conf file is below:

    2-> Centos/ Fedora :   {  /etc/httpd/conf/httpd.conf } 
    

    Now find the line that reads in file httpd.conf

    Listen 80

    Now we will force httpd to listen port 80 and 8181 by writing

    Listen 80 Listen 8181

    Now save and close the httpd file and restart the httpd.

    /etc/init .d/httpd restart
    

    For more information see the link below:

    Link: http://www.cyberciti.biz/faq/fedora-rhel-centos-configure-httpd-listen-multipleports/

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: