Pages

Wednesday, August 20, 2014

Configure Multiple Instances of Apache (HTTPD) on Same Server

There are many cases where I need to work with multiple instances of Apache Server. This article tells you on how to configure multiple instances of Apache on the same server.

1. Duplicate the Http Configuration File
    cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd1.conf

2. Duplicate the conf.d location
    cp -pr /etc/httpd/conf/conf.d/  /etc/httpd/conf/conf.d2/

3. Change the PID file Name, Listen port number and include the conf.d2 location
    Change PidFile run/httpd.pid to run/httpd.pid2
    Listen 80 to Listen 81
    Include conf.d2/*.conf

4. Start the Second Instance using
    httpd -f /etc/httpd/conf/httpd1.conf -k start

5. Start the First Instance using
     Start httpd start

We can confirm using “netstat –tulpn | grep 80|81” Or we can access the localhost:80 , localhost:81


More to come, happy learning J

1 comment :

  1. Wow, that's what I was seeking for, what a data! present here
    at this weblog, thanks admin of this website.

    Feel free to visit my blog post; Christian Louboutin Sale

    ReplyDelete