Results 1 to 12 of 12
  1. #1
    Join Date
    Jan 2005
    Posts
    2,175

    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?

  2. #2
    Join Date
    Mar 2007
    Location
    Phoenix, AZ
    Posts
    132
    run lighttpd on a separate port for the second domain.
    Use mod_proxy in Apache to redirect traffic for the second domain to lighttpd.
    Cheers,
    Sivanandhan, P. (a.k.a. apsivam)
    My Blog Site

  3. #3
    Join Date
    Jan 2005
    Posts
    2,175
    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.

  4. #4
    Join Date
    Mar 2007
    Location
    Phoenix, AZ
    Posts
    132
    but you cannot run two application on the same IP & Port.
    I cannot think of another way. :-(
    Cheers,
    Sivanandhan, P. (a.k.a. apsivam)
    My Blog Site

  5. #5
    Join Date
    Apr 2003
    Location
    Melbourne, AU
    Posts
    539
    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?
    WK Woon
    CTO | http://www.aflexi.net - A flexible Network
    Building the next generation CDN platform - DEMO .... coming soon

  6. #6
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    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.

  7. #7
    Join Date
    Oct 2002
    Location
    Manchester, UK
    Posts
    1,164
    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.
    Rob Greenwood
    RedHat Certified, Unix Consultant
    http://www.linkedin.com/in/bilco105

  8. #8
    Join Date
    Aug 2003
    Location
    Chicago, IL USA
    Posts
    2,781
    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.

  9. #9
    Join Date
    Dec 2006
    Posts
    477
    Normally in this situation, you use lighttpd to proxy to apache, not apache to proxy to lighttpd.

  10. #10
    Join Date
    Jan 2005
    Posts
    2,175
    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.

  11. #11
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    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.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  12. #12
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •