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

Apache + {mod_vhost_alias|mod_rewrite}


Here is what I'm trying to do:

Example virtualhost

	ServerName www.domain.com
	ServerAlias domain.com
  	ServerAlias www.anotherdomain.com
	DocumentRoot /home/users/corgrjar
  	ScriptAlias /cgi-bin/ /home/users/corgrjar/cgi-bin/
  	User corgrjar
  	Group webusers

I want to use mod_vhost and or mod_rewrite to change directory
layout and to minimize the memory usage/startup time of apache and to
have a nicer dirctory structure. 

This is how far I have come: 

	ServerName www.domain.com
	CustomLog logs/access_log.mvhost vcommon
       	VirtualDocumentRoot /virtualhosts/%2.1/%0/
       	VirtualScriptAlias  /virtualhosts/%2.1/%0/cgi-bin

The DocumentRoot would be: /virtualhosts/d/www.domain.com/
But then I have to solve this problem with ServerAliases.
I could make a symlink for www.anotherdomain.com in 
/virtualhosts/a/www.anotherdomain.com -> ../d/www.domain.com/
But that would be _alot_ of symlinks.

So my question is if you could have a file with the ServerAliases
assosiated with the path or anything similar and rewrite it to the 
ServerName directory. And to make it even more complex a domain 
(ServerName) can have more than one ServerAlias assosiated with it. 

Has anyone done this? Is it possible?

 .''`. Fredrik Steen, 
: :' : 2CD6 C838 BE77 795F 5EF1  3E5B DA91 EE7B A58E 164
`. `'  http://www.stone.nu/
  `--  http://www.debian.org/

To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: