Re: [SLUG] configuring apache rendering file list in a directory.

From: Ian C. Blenke (icblenke@nks.net)
Date: Wed May 15 2002 - 14:55:02 EDT


On Wed, 2002-05-15 at 13:00, Patrick (at work) wrote:
> I was getting a 404
> The error log:
> File does not exist: /usr/local/httpd/htdocs/home/shared/common
>
> I created a symbolic link in
> /usr/local/httpd/htdocs called
> common
>
> Now I am getting a 403 - forbidden
> Symbolic link not allowed: /usr/local/httpd/htdocs/common

You need to use the "FollowSymlinks" directive.

> I am trying to create (in M$ lingo) a virtual directory
> under
> /usr/local/httpd/htdocs that points to
> /usr/local/httpd/htdocs/home/shared/common
> so that
> a browser pointed to http://www.myserver.com/common
> will list the files in
> /usr/local/httpd/htdocs/common

Try this:

<Directory /usr/local/httpd/htdocs/home/shared/common>
 Options Indexes
 order allow,deny
 allow from all
</Directory>

Alias /common /usr/local/httpd/htdocs/home/shared/common

This sets up a "virtual directory" as you are looking for
(the Alias keyword is what you are looking for).

*OR*, if you want to have a filesystem symlink to that:

<Directory /usr/local/httpd/htdocs>
 Options FollowSymlinks
 order allow,deny
 allow from all
</Directory>

And then run:

        # cd /usr/local/httpd/htdocs
        # ln -s home/shared/common .

Viola.

> When any changes are made to I have to stop and restart Apache? Or are the
> conf files parsed with each access?

The conf files are parsed when you start apache. They are not re-read
after each access, as that would definitely be resource intensive. You
can use the "apachectl reload" command, or send the processes a SIGHUP
(the former is a bit easier, and the recommended method).

- Ian



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:36:31 EDT