Forum Moderators: phranque

Message Too Old, No Replies

Pointing vhost outside webroot

         

ziekke

2:54 pm on Apr 12, 2004 (gmt 0)

10+ Year Member



I have a vhost (files.domain.tld) that I want to access a directory outside the webroot.

This doesn't work when I try to directly put it there like this:

<VirtualHost XXXXXXXXX>
ServerAlias files.domain.tld
DocumentRoot /path/to/something/outside/webroot
</VirtualHost>

However, if I make it look like this:

<VirtualHost XXXXXXXXX>
ServerAlias files.domain.tld
DocumentRoot /path/to/webroot/files
</VirtualHost>

Where /path/to/webroot/files is a symlink to /path/to/something/outside/webroot then it does seem to work.

I would rather not link it directly within my webroot, how would I go about pointing files.domain.tld to /path/to/something/outside/webroot without getting a forbidden error?

lemat

10:38 am on Apr 14, 2004 (gmt 0)

10+ Year Member



add Options FollowSymLinks
or Options FollowSymLinksIfOwnerMatch

look for these in apache manual, there is an explanation for it.