[techtalk] Minor ln -s question

BiOFH biofh at biofh.org
Fri Apr 20 21:02:01 EST 2001


Ack! Bad BiOFH... BAD! I haven't read this list in ages...

But, I saw this and wanted to send out a little caveat to you that 
may or may not apply (depending on how the server is set up).
Depending on how and if the web server in question handles symlinks, 
(Options ->FollowSymLinks  or Options->SymLinksIfOwnerMatch must be 
enabled) this may or may not work as expected. For instance, here's 
an example someone tried on ours:

In the www root someone did
ln -s project ./Project
(they didn't like the capital letter)

Looks OK except one thing... It won't work in our environment (and 
many others). Going to www.ourdomain.com/project fails and does not 
redirect to www.ourdomain.com/Project . If, on our server, the 
symlink was owned by root it would be followed. Otherwise, it's 
ignored.
Project is the virtual address and a symlink is nothing in the 
server's eye (except a nuisance).
However, setting the virtual address "project" to point to the same 
physical directory as "Project" in the conf file will do the trick. 
Or, in your case, just pointing virtual "shag" at  "/var/www/shag/" 
would do the trick (assuming it now points to "/var/www/kathweb/shag" 
or "/var/www/kathweb/".

Anywho... I'm getting long-winded.... The simplest thing to do is
   Alias /shag  /var/www/shag
in the conf section for www.kathweb.net

Mouthy, loud and long-winded,
Maggie


>Date: Fri, 20 Apr 2001 17:20:08 -0400
>From: Kath <ranger at optonline.net>
>To: techtalk at linuxchix.org
>Subject: [techtalk] Minor ln -s question
>
>This is a multi-part message in MIME format.
>
>--Boundary_(ID_/hEPgsJegGU0lQ2D5giInA)
>Content-type: text/plain; charset=iso-8859-1
>Content-transfer-encoding: 7BIT
>
>I have the directory /var/www/shag/
>
>I want to link /var/www/kathweb/shag/ to it, so when someone goes to 
>www.kathweb.net/shag/, the directory of shag/ is displayed.
>
>How do I do this?
>
>And yes I know about virtualhosting, but that is not an option right 
>now because my friend's ISP's DNS server has stopped resolving my 
>domain name.  Stupid Road Runner!  And yesterday it was working 
>fine.  Everyone else can reach me too, so it isn't me.
>- Kath, perpetually confused by ln -s
>

-- 




More information about the Techtalk mailing list