httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Multiple URLs / One Site
Date Mon, 26 Apr 2004 21:05:15 GMT

On Mon, 26 Apr 2004 wrote:
> The next step is the one I'm not clear on.  There are a bunch of other
> entitities who resell the services offered by and each
> will use this site.  All are accessing the *same* site, any differences
> in what they see based on the URL used for access are handled by the
> PHP code that runs the site (it looks at HTTP_HOST or the request URI).
> Each reseller will create a third-level domain through which to access
> the site.  So the DNS mapping look like this:
>		x.x.x.2
>		x.x.x.2
> etc.  These are for the non-secure portion of the site only.  When we
> get to needing SSL everyone funnels through  But up
> to that point, each one sees the site through their own URL -- at least
> that's what I want.
> I am figuring I do not need virtual hosting for these mappings because
> they are not accessing separate sites, I don't need or want each to
> have a separate document root, etc.
> If that's right then what, if anything, do I need to do to the above
> configuration to get the server to respond properly (I can't ask the
> other businesses involved to do test mappings for me, so I don't have a
> simple way to just try it and see)?  Does the server need to know each
> site's URL or can I get it to respond to anything that comes its way
> for that IP?  If so can I leave the ServerName set for the base site,
> or should it be changed?  If I leave it alone where does the server
> name show up for users who visit the site through one of the reseller
> URLs?

With IP virtual hosting, the server doesn't care about the name at all, so
you don't really need to do anything.  All requests for that IP address
will go to the right virtualhost.

There is one small caveat.  Occasionally apache needs to create
self-referential URLs.  For example, it sometimes needs to construct a
redirect pointing to itself.  For that purpose, it can either use the
configured ServerName, or it can use whatever the client specified as the
name it is looking at.  Since you want the latter, you'll want to set
UserCanonicalName off
inside the VirtualHose section.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message