Re: [users@httpd] Virtual hosting - 2.2.2 - XP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Saturday 05 August 2006 19:31, kurt miller wrote:
> Thusfar, I am able to successfully map to the local
> development sites using virtual hosting and my hosts file. The problem I
> am struggling  with is how to map the www.xxx.dynalias.com to more
> than one site. Is this even possible? As in www.xxx.dynalias.com/site1  or 
> www.xxx.dynalias.com/site2 etc. 

That depends, really. You can't delegate subdirectories within a domain to 
different vhosts via ServerName or ServerAlias; It's simply not made for 
that. What you could do is use yyy.xxx.dynalias.com for client yyy, 
zzz.xxx.dynalias.com for client zzz, etc however, if your dynamic DNS 
provider assigns a wildcard to your host.
If you absolutely want http://www.xxx.dynalias.com/yyy/ to work, you can 
achieve that in various ways; one of them would be to define an Alias or 
ScriptAlias for /yyy to the directory you run site yyy out of. If you do not 
use further configuration in the vhost context for the local yyy, that would 
work. If you do, however, configure different local vhosts differently (or 
want logging in separate files), you could use mod_proxy to forward requests 
sent to /yyy/ to yyy.local transparently using mod_rewrite :

RewriteRule ^/yyy/(.*)$ http://yyy.local/$1 [P]

inside the public-facing vhost would transparently proxy requests to /yyy/* to 
your local vhost (assuming apache on that machine can locally resolve the 
local hostname). You may have to twiddle with your code a bit so that it can 
handle being invoked via an URL that it does not know about, though, and logs 
will include 127.0.0.1/localhost as the remote ip/host. It's also not the 
most efficient solution, but from your comments I assume this is not a 
production environment, anyway.

--Eike

Attachment: pgpKUg9mYAlO9.pgp
Description: PGP signature


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux