|
Posted by Jerry Stuckle on 06/26/05 23:49
Captain Ranger McCoy wrote:
> Hello!
>
> Suppose I have ten servers at ten ips:
>
> x.x.x.1
> x.x.x.2
> x.x.x.3
> x.x.x.4 and so on
>
> Each server hosts 100+ photo galleries, all under a single domain name,
> but in different directories:
>
> gallery.com/gallery100
> gallery.com/gallery2000
> gallery.com/gallery300
> gallery.com/gallery4442
>
> How is it possible to configue apache to point to ten different
> servers, depending on which gallery is accessed?
>
> I don't want the domain to be merely forwarded, but all hits in any
> gallery, such as gallery.com/gallery4442, must leave
> gallery.com/gallery4442 in the access window.
>
> Is this possible? What's the best way to do this? Thanks so much!
>
> (If this isn't clear, I'll elaborate). Thanks!!
>
You're going to have a problem here. If all servers have access to the
same content, they can all have the same domain name. However, if
they're going to server up different content, there needs to be a way to
differentiate them.
For instance - let's say you have a web page with six images. If you
had all your servers named gallery.com, the web page would be pulled
form one of the servers. But now the browser would request the first
image on the page (i.e. "picture1.gif" or "gallery100/picture1.gif").
But there is no guarantee that the request would end up at the same
server which sent the page itself (since all servers have the same host
name). The only solution to this is to have all servers have access to
the same information.
You could offload some of the work to other machines - especially if you
need to server dynamic pages and/or use a databases. In this case
different machines can contain different dynamic pages and/or databases.
This way you might be able to get by with a few servers having access
to all content. Alternatively, you could implement one server acting as
a proxy and use it to forward requests to other servers. It's more work
and not as scalable, but if you're doing a lot of static pages it might
work better.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|