[svlug] Multiple Web Servers on One IP

Sargun Dhillon xbmodder at gmail.com
Thu May 29 19:44:01 PDT 2008


You can do that also. Mod_proxy + Lighttpd gives you an infinitely
scalable (love marketing speak!)

On 5/29/08, Chris Miller <lordsauronthegreat at gmail.com> wrote:
> Luke S Crawford wrote:
>> Chris Miller <lordsauronthegreat at gmail.com> writes:
>>
>>> Right now I'm having trouble getting two instances of lighty to run at
>>> the same time without a major identity crisis.  I put my relevant
>>> configuration files on a pastebin, so if you've got the time and are
>>> so inclined you might be able to tell me where I'm going wrong.
>>>
>>> http://pastebin.com/m7d3def32
>>>
>>
>> Your basic problem is that you cant run two seperate daemons on the same
>> IP/port pair.
>>
> I don't understand.  One is listening on 72.249.76.50, which is my one
> static IP address, which is the LigHTTPd instance that should be routing
> requests to www.fsdev.net to 127.0.0.2 (Apache) or requests to
> dl.fsdev.net to 127.0.0.3 (another LigHTTPd instance).  They share the
> same ports, but they're on different IPs, right?
>
> Or, I could have mod_proxy send like so:
>
> digraph g {
>     "downloading client"
>     "normal client"
>     "LigHTTPd (1) 72.249.76.50:80\n(*fsdev.net:80)"
>     "dl.fsdev.net:80"
>     "fsdev.net:80"
>     "Apache (127.0.0.2:82)"
>     "LigHTTPd (2) (127.0.0.3:83)"
>     "normal client" -> "fsdev.net:80"
>         -> "LigHTTPd (1) 72.249.76.50:80\n(*fsdev.net:80)"
>         -> "Apache (127.0.0.2:82)"
>     "downloading client" -> "dl.fsdev.net:80"
>         -> "LigHTTPd (1) 72.249.76.50:80\n(*fsdev.net:80)"
>         -> "LigHTTPd (2) (127.0.0.3:83)"
> }
>
> Would that be possible?  Would that remove the port conflict?  From the
> server to the Internet would still be over port 80, but locally it'd be
> different.  Could that work?
>> As others have suggested, you can put a proxy on port 80 that proxies
>> some requests to localhost on one port or the other port depending on
>> hostname/filename/soemthing...
>>
>>
> I think that what I'm asking is possible is just what you said, but I
> perceive ambiguity therefore I ask for clarification.
>> Apache can be that proxy, so can squid. A few other suggestions were made.
>>
>> Personally, I would just run the second server on a different port and be
>> done with it and not  worry about people who can't get to ports other than
>>
>> 80, especially when you are running in such a resource-constrained
>> environment.
>>
> It's either that or cough up another dollar per month to buy another
> static IP.  I don't want to do that, because I know it's possible to get
> away with not doing that.  I figure that not leveraging the increased
> freedom of root access isn't using the extra money I'm paying for it.
>
>



More information about the svlug mailing list