LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing two apache server in a single machine (https://www.linuxquestions.org/questions/linux-newbie-8/installing-two-apache-server-in-a-single-machine-4175457581/)

yashfire007 04-09-2013 11:02 PM

Installing two apache server in a single machine
 
Dear all,

Yesterday i have attended an interview. In that interview one of the questions is,
" I have installed an Apache server with version 2.4 and i want to install another Apache server with version 2.6 in the same machine. How can i install and use. While installing Apache 2.6 it should not overwite the Apache 2.4 installed files. And two daemons also should not collide".

Please let me know the answer for the above....

Madhu Desai 04-10-2013 12:45 AM

Through Virtual Machine is one possibility.

lambo69 04-10-2013 12:45 AM

I never tried this, but my first approaches were to put each in its own chroot or to use virtualization.

eklavya 04-10-2013 01:20 AM

USE XAMPP...
Now you can have two apache with different versions , even with different versions of php.
The default project directory of one Apache will be
Code:

/var/www/html
& XAMPP's apache will be
Code:

/opt/lampp/htdocs
Stop one & use other and vice versa. Because port is same for both i.e. 80
Now they will never be overlapped.

Madhu Desai 04-10-2013 01:21 AM

i'm not apache expert, but simple google search brought many hits.

Multiple Apache Installations HOWTO
Multiple Versions of Apache on a Single System
Running Multiple Apache Instances

Have people lost faith in google? ;)

j-ray 04-10-2013 01:46 AM

You can install different versions and simply let them listen on different ports. They can even share the same document root.

bathory 04-10-2013 02:16 AM

This could be a tricky question, as there is no apache-2.6 version
Other than that you can have multiple apache instances running as long as they are listening on different ports.


All times are GMT -5. The time now is 04:59 PM.