You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Casas, Claudia" <CC...@utep.edu> on 2002/03/15 22:29:15 UTC

need a more general solution

After looking around some configuration examples, I finally know of a
solution on how to get rid of the tilde in a web account that is not located
in the apache root directory.
 
I do the following:
 
Alias /students  /home/students/www/
 
<Directory /home/*/www/>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
 
Now I can actually access the web accout as http://my.domain.com/students
<http://my.domain.com/students>  instead of http://my.domain.com/~students
 
 
However, I realized that with this solution is not as general as I wish. I
have more than 100 accounts, and I do not think it would be very efficient
to write an alias for each individual account. Is there a more general
solution to this? 

Re: need a more general solution

Posted by Lewis Watson <li...@visionsix.com>.
You could just have their directories at the root level of the docs folder of http://my.domain.com/ then when you go to the url  http://my.domain.com/students  there the students folder would be.

Lewis Watson

  ----- Original Message ----- 
  From: Casas, Claudia 
  To: users@httpd.apache.org 
  Sent: Friday, March 15, 2002 3:29 PM
  Subject: need a more general solution


  After looking around some configuration examples, I finally know of a solution on how to get rid of the tilde in a web account that is not located in the apache root directory.

   

  I do the following:

   

  Alias /students  /home/students/www/

   

  <Directory /home/*/www/>

  Options None

  AllowOverride None

  Order allow,deny

  Allow from all

  </Directory>

   

  Now I can actually access the web accout as http://my.domain.com/students instead of http://my.domain.com/~students

   

   

  However, I realized that with this solution is not as general as I wish. I have more than 100 accounts, and I do not think it would be very efficient to write an alias for each individual account. Is there a more general solution to this? 


Re: need a more general solution

Posted by Joshua Slive <jo...@slive.ca>.
Casas, Claudia wrote:
> After looking around some configuration examples, I finally know of a 
> solution on how to get rid of the tilde in a web account that is not 
> located in the apache root directory.

> Alias /students  /home/students/www/

See:
http://httpd.apache.org/docs/urlmapping.html

You can do
AliasMatch ^/([^/]*)/?(.*) /home/$1/www/$2

But then it will be impossible to access your documentroot.  The whole 
point of the "~" is to designate requests that go to a different part of 
the filesystem and differentiate them from requests for the 
documentroot.  If you still need to be able to access your documentroot, 
please let us know how you want to differentiate between user-directory 
requests and documentroot requests.  Then I may be able to help further.

Joshua.


---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org