We have a need to run Apache 2.2 and Apache 2.4 web servers on the same VM. The need is created by:
- A requirement to host an Oracle WebGate module, which doesn't support Apache 2.4 (we use the Red Hat provided 2.2 httpd for that)
- A requirement to use Apache 2.4 native sessions, in association with the WebGate processing
- A limitation on the number of VMs we can use (requiring that both web servers be in the same VM)
This all has to occur on a RHEL 5.8 VM (note there's no Red Hat RPM for Apache 2.4 for RHEL5 [nor 6, actually]). Our general intent is to have the 2.2 instance acting as a reverse proxy to a localhost-port-listening 2.4 instance (which is itself acting as a reverse proxy to our origin servers). Configuring to avoid port conflicts, to handle the proxying, etc. is not an issue, i'm well versed in such. It's the general approach to having both server versions installed and operational at the same time that I'm unsure of.
Has anyone done this before? And if so, what was your general approach? Did it work cleanly having both versions installed together, or did you have to e.g. chroot one to create separation between libraries? Or did you statically link in everything needed for the 2.4 binary, or what? We run SELinux in enforcing mode – are there any implications to be aware of on that front?
I've come up empty on googling for anyone who has done something similar, hoping someone here has.
Thank you!
Best Answer
You can build httpd-2.4 from source, first of all you need to upgrade apr/apr-util to at least 1.3.0
Build and install apr-1.4.8
Build and install apr-util-1.5.2
Build and install apache-2.4.6
I would suggest do not touch system apr/apr-util packages
Some basic checks
I know that build packages from source it's a bad idea, but sometimes it is the only way out