2 apache servers via apt-get?

I would like to run two apache2 web-servers on Ubunto 6.06, an apache 2.2 front-end server sending requests via proxy-pass to a mod_perl2 backend server running on port 81.

I have the mod_perl-enabled backend server (2.0.55) up and running using apt-get, and could do a manual compile & install of apache 2.2 from source, but would like to use apt-get to install & configure it.

Is it possible to install v2.2 using aptitude, and without over-writing my existing installation?

4 Replies

You can run two instances of the same apache binary with different configurations. Something like:

cp -a /etc/apache2 /etc/apache2-secondary

Set up the configuration in the apache2-secondary directory, then fire off something like:

httpd -f /etc/apache2-secondary/apache2.conf -k start

Unless there is some specific Apache 2.2 feature you need in the proxy layer, you could also use lighttpd as the proxy.

Nothing specific to Apache2, it's just that I need the ProxyPass functionality for the front-end and am very familiar with Apache2 config but have never used lighttpd. Might have a go though. Is lighttpd easy to set-up for 6.06 using apt-get? And can it do proxypass (or equivalent)?

And thanks Xan, that looks like an easy one to try for starters.

Lighttpd should be able to do what you need; the doc for the proxy module is at http://trac.lighttpd.net/trac/wiki/Docs%3AModProxy. In Debian, lighttpd is just an apt-get away; don't know about Ubuntu.

OTOH, just running two instances of apache with different config files might be more convenient. The advantage (to my experience) of lighttpd is less memory use.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct