var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
apache and lighttpd
There are 2 different domains with the same IP being served by Apache. I want one of the domains to be served by lighttpd, is it possible without having to change the IP of that domain?
run lighttpd on a separate port for the second domain.
Use mod_proxy in Apache to redirect traffic for the second domain to lighttpd.
I rather not run it on a separate port, any other way to do this? And it's not good to redirect traffic, it still goes through Apache first, something I want to avoid.
but you cannot run two application on the same IP & Port.
I cannot think of another way. :-(
The short answer is that you cannot, due to the reason that apsivam gave.
Why do you want to install lighttpd, and why don't you want to run it on a second IP?
- A flexible Network
Building the next generation CDN platform - DEMO .... coming soon
Yes you can run lighthttpd on different IP's and the same port (80 for example).
Just configure apache to LISTEN only on 1 or more IP's and lighthttpd to LISTEN on another or more IP's.
He asked for a solution using the same IP and port, for whatever reason.
Obviously this isn't possible. Steve's is the only viable solution.
What's the reason you require both HTTP servers?
Regardless if you do or not, you're going to have to use a proxy for the same IP. I if you don't want Apache to proxy traffic, use a dedicated server like Squid.
Normally in this situation, you use lighttpd to proxy to apache, not apache to proxy to lighttpd.
I want to serve static multimedia content with lighttpd. Is it difficult to change the IP of the second domain on a Cpanel server? I just didn't want to go through the hassle of doing that.
It is easy to change the IP address of a domain on a cpanel server. Either you can change it using the option inside the WHM or manually edit the httpd.conf VH entry and named related files of the domain to reflect the IP change.
Just make a new subdomain, give it a dedicated ip, make lighty run on that ip, and be set. Subdomains are the key to scalability, you're building a wall around yourself if you choose otherwise.
Also, nginx is better than lighty for static content.