Date: Mon, 20 Sep 1999 10:46:41 +0100 From: "Peter McGarvey" <Networks.Manager@rncm.ac.uk> To: "Dan Mahoney Jr." <danm@DanMahoney.com>, <freebsd-questions@freebsd.org> Subject: RE: httpd questions Message-ID: <NDBBJLAJELEHNLGABIJNAENBCJAA.Networks.Manager@rncm.ac.uk> In-Reply-To: <Pine.BSF.4.10.9909200301170.37235-100000@acetylene.vapornet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> 1. Is there a way to turn off the tilde in userdirs, as we are porting
> from a system where userdirs were handled differently (read:poorly). Jon
> Chen on this list suggested in an earlier email to create a symlink from
> htdocs/username to username/public_html (but that sounds like a LOT of
> symlinks), as well as a complication to adding and removing users.
I suspect you're stuck with the tilde thing unless you rewrite apache. I
agree the symbolic links thing is a bit of a pain. I faced a similar
problem when I migrated our webservers off NT onto a BSD/Apache box. I
found the best work around was to add a permanent redirect to httpd.conf.
<VirtualHost 193.63.96.1>
ServerName www.rncm.ac.uk
Redirect permanent /users/xaphod http://hermes.rncm.ac.uk/~xaphod
</VirtualHost>
If you have many users it should be simple enough to write a tiny perl
script to create the directives for you.
> 2. Is there some way to prevent virtual hosts from reflecting userdirs:
>
> For example, www.ourwebhostingclient.com/~anyuser
>
> should NOT show through, but it does.
>
To do this you need to place the user directory directives within the
virtual host directives. The following is snipped from my httpd.conf.
NameVirtualHost 193.63.96.1
<VirtualHost 193.63.96.1>
ServerName hermes.rncm.ac.uk
... snippage...
UserDir public_html
<Directory "/home/*/public_html">
... snippage...
</Directory>
... snippage...
</VirtualHost>
<VirtualHost 193.63.96.1>
ServerName www.rncm.ac.uk
... snippage...
</VirtualHost>
The URL
http://hermes.rncm.ac.uk/~xaphod
gets to my home directory whereas
http://www.rncm.ac.uk/~xaphod
throws out a 403 error.
TTFN, FNORD
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Peter McGarvey, Networks Manager | email: Networks.Manager@rncm.ac.uk
Royal Northern College of Music | tel: +44 (0)161 907 5218
124 Oxford Road, Manchester, | fax: +44 (0)161 273 7611
England M13 9RD | mobile: +44 (0)7887 990564
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Thanks for all the help...
>
> -Dan Mahoney
>
> --
>
> "She's been getting attacked by these leeches, they're leaving
> these marks
> all over her neck. You gotta keep her out of those woods. If one more
> leech gets her, she's gonna get a smack."
>
> -Someone's Mother, December 18th, 1998
>
> Dan Mahoney
> Gushi on efnet IRC
> ICQ:13735144
> AIM:LarpGM
> (webpages TBA)
>
>
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NDBBJLAJELEHNLGABIJNAENBCJAA.Networks.Manager>
