Re: Rewriting as per-user-subdomains

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

 



On Sat, May 24, 2008 at 11:30 AM, Marcin 'Rambo' Roguski
<rambo@xxxxxxxxxxxx> wrote:
> Hi,
>
> I was given a task for configuring the server so that if one calls
> http://www.user.do.id.uw.edu.pl (yes, I know it's way too long- but on purpose)
> the server will silently rewrite the request so
> http://do.id.uw.edu.pl/~user/joomla/ will be given
>
> Wasn't a difficulty finding it in httpd docs, however it doesn't trigger.
> RewriteCond   %{HTTP_HOST}              ^www\.[^.]+\.do\.id\.uw\.edu\.pl$
> RewriteRule   ^(.+)                    %{HTTP_HOST}$1          [C]
> RewriteRule   ^www\.([^.]+)\.do\.id\.uw\.edu\.pl(.*)    http://do.id.uw.edu.pl/~$1/joomla$2
> RewriteLog /var/log/apache2/userdomain-access.log
>
> The possible problem: the machine (do.id.uw.edu.pl) is basically a huge
> "NameVirtualHost" hosting about 30 domains which are aliases to do.id.uw.edu.pl.
> Apache manages pretty well when I specify a ServerName in VirtualHost directive
> but is clueless about this:
>
> <VirtualHost do.id.uw.edu.pl>
> ServerName www.*.do.id.uw.edu.pl
>
> ...
> </VirtualHost>
>
> Is there any way to make it work?

ServerAlias accepts wildcards, or just make sure all this mumbo-jumbo
happens in the first virtualhost for a set of NameVirtualHosts's -- it
will be the default.


-- 
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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