# Symbolic link not allowed problem with apache2

## loony

Hello,

I have a problem with my apache2 conf:

My documentroot is /var/www/localhost/htdocs/htdocs

The last "htdocs" is a symlink to a directory which is located on a fat32 partition. Even though I have set all the necessary permissions in fstab and added the apache user to the group "users" (which is the group I have used in the fstab for that partition) and I have enabled the "FollowSymlink"-Option in the commonapache2.conf I get the following error:

```
[Fri Jul 09 18:47:12 2004] [error] [client 127.0.0.1] Symbolic link not allowed: /var/www/localhost/htdocs/htdocs
```

Can anybody help? I just want all my www-documents on a fat32 partition and access it with apache/linux and apache/win.

Thanks!

l00ny

----------

## tuxmin

Hi,

can you verify that the FAT32 is not the problem. What happens if you set /var/www/localhost/htdocs as Docroot and in your <Direcotry> as well?

Alex!!

----------

## loony

 *tuxmin wrote:*   

> Hi,
> 
> can you verify that the FAT32 is not the problem. What happens if you set /var/www/localhost/htdocs as Docroot and in your <Direcotry> as well?
> 
> Alex!!

 

Yes, everything works well then, I get the normal apache index page saying that apache is working...

It has something to do with permissions, but I don't know where to look other than apache2.conf, commonapache.conf, fstab and passwrd...

loony

----------

## tuxmin

I'm not really sure, but it seems that apache does not accept a symlink as its DocRoot. Try to use the absolute Path on your FAT32 partition.

Alex!!!

----------

## loony

 *tuxmin wrote:*   

> I'm not really sure, but it seems that apache does not accept a symlink as its DocRoot. Try to use the absolute Path on your FAT32 partition.
> 
> Alex!!!

 

Now I get a permission denied... 

```
[Sat Jul 10 09:23:31 2004] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html denied
```

hm, this is the entry in my fstab for the partition:

```
/dev/hda4 /home/loony/fat32 vfat umask=0000,gid=users,quiet 0 0
```

apache2.conf

```
DocumentRoot /home/loony/fat32/www/htdocs/
```

commonapache2.conf

```
###

### This should be changed to whatever you set DocumentRoot to.

###

<Directory /home/loony/fat32/www/htdocs/>

#

# This may also be "None", "All", or any combination of "Indexes",

# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".

#

# Note that "MultiViews" must be named *explicitly* --- "Options All"

# doesn't give it to you.

#

#    Options -Indexes FollowSymLinks MultiViews

    Options FollowSymLinks MultiViews

#

# This controls which options the .htaccess files in directories can

# override. Can also be "All", or any combination of "Options", "FileInfo",

# "AuthConfig", and "Limit"

#

    AllowOverride All

#

# Controls who can get stuff from this server.

#

    <IfModule mod_access.c>

      Order allow,deny

      Allow from all

    </IfModule>

</Directory>

```

loony

----------

## tuxmin

Is everything along the path to /home/loony/fat32/www/htdocs/index.html at least world readable?

Alex!!!

----------

## loony

 *tuxmin wrote:*   

> Is everything along the path to /home/loony/fat32/www/htdocs/index.html at least world readable?
> 
> Alex!!!

 

I have now moved all that to a totally new directory-tree and made sure that the permissions thing isn't the problem. Now the direct path works. The symlink only works when specifying a real directory as document root:

```

DocumentRoot /var/www/localhost/

```

In /var/www/localhost there is a symlink called htdocs that points to /mnt/fat32/www/htdocs/

The url for the browser is

```
http://localhost/htdocs/index.html
```

So a symlink as the documentroot seems not to work with apache ...

Thank you for your help, Alex!

loony

----------

