Apache Server configuration support - follow symlinks outside of documentroot?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > January 2004 > follow symlinks outside of documentroot?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author follow symlinks outside of documentroot?
Matt Garman

2004-01-28, 3:34 am

I'm running Apache 1.3.27 under OpenBSD 3.3. DocumentRoot is set to
"/var/www/htdocs" and FollowSymLinks is enabled.

However, whenever I try to create a symbolic link to a directory below
the DocumentRoot, Apache returns a 404 Not Found, even with read
permissions set to everyone.

For example:

mkdir /blah
chmod 777 /blah
touch /blah/file1
touch /blah/file2
touch /blah/file3
chmod 666 /blah/file*

ln -s /blah /var/www/htdocs/blah

Now if I try to go to http://myserver/blah, I get a 404.

If I do the exact same thing, but put the blah directory under
/var/www/htdocs (instead of the root), and symlink to it (i.e. ln -s
/var/www/htdocs/blah /var/www/htdocs/test) it works as expected (i.e.
creates an index and shows the directory contents of test).

It appears that Apache won't follow a symlink outside of DocumentRoot,
regardless of permissions. Do I need to explicitly configure other
directories that Apache can serve?

Thanks,
Matt

--
Matt Garman
email at: http://raw-sewage.net/index.php?file=email
Joachim Ring

2004-01-29, 4:35 am

> I'm running Apache 1.3.27 under OpenBSD 3.3. DocumentRoot is set to
quote:

> "/var/www/htdocs" and FollowSymLinks is enabled.


<snip>
quote:

> It appears that Apache won't follow a symlink outside of DocumentRoot,
> regardless of permissions. Do I need to explicitly configure other
> directories that Apache can serve?



openbsd puts apache in a chroot jail by default for security reasons.
no way to get outside for apache.

man chroot

joachim
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com