You are not logged in.

#1 2008-01-16 23:54:04

newcar
Member
From: Brasil
Registered: 2008-01-10
Posts: 33

Apache2 not following symbolic links [SOLVED]

Well, i installed apache2 from official repositories and its running perfectly, with one problem, its not following symbolic links to folders out side /home/httpd/html, and o dont think its a problem with the FollowSymLinks option...

I edited httpd.conf to use only virtual host, here is the virtual host conf:

NameVirtualHost *

<VirtualHost *>
    ServerAdmin deltah@deltah.com.br
    
    DocumentRoot /home/httpd/html

    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>

    <Directory /home/httpd/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog /var/log/httpd/error.log

    # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel debug

    CustomLog /var/log/httpd/access.log combined

    ServerSignature On
</VirtualHost>

My /home/httpd/html is like this:

drwxr-xrwx 3 root root 4.0K 2008-01-16 21:46 .
drwxr-xr-x 7 root root 4.0K 2008-01-16 19:10 ..
lrwxrwxrwx 1 root root   21 2008-01-16 21:46 link_to_home_ricardo_wwwroot -> /home/ricardo/wwwroot
lrwxrwxrwx 1 root root   25 2008-01-16 21:45 link_to_some_dir -> /home/httpd/html/some_dir
-rw-r--r-- 1 root root   17 2008-01-16 20:02 phpinfo.php
drwxr-xr-x 2 root root 4.0K 2008-01-16 21:45 some_dir

When i go to http://127.0.0.1:8888/ i can see only this:

[DIR]    link_to_some_dir/     16-Jan-2008 21:45      -
[ ]    phpinfo.php     16-Jan-2008 20:02     17
[DIR]    some_dir/     16-Jan-2008 21:45     -

The link_to_home_ricardo_wwwroot folder is not there. As you can see only symbolic links to folders/files inside /home/httpd/html folder is working.

My /home/ricardo/wwwroot has drwxrwxrwx permission...

Any ideas? If its needed i can post my httpd.conf and more info...

I tried everything, its driving me crazy and i need it to work.

Last edited by newcar (2008-01-17 18:13:38)

Offline

#2 2008-01-17 07:13:10

VikM
Member
Registered: 2007-11-10
Posts: 50

Re: Apache2 not following symbolic links [SOLVED]

I guess the apache user (httpd?) can't cd to /home/ricardo/. Of course it can't cd even deeper.
Add the httpd user to the ricardo's group (users I guess) and put read rights for group on /home/ricardo/.

Just for testing, do 'su - httpd' and see what you can access.

Offline

#3 2008-01-17 13:42:17

quad3d@work
Member
From: Austin, TX
Registered: 2006-12-29
Posts: 81
Website

Re: Apache2 not following symbolic links [SOLVED]

newcar wrote:

My /home/ricardo/wwwroot has drwxrwxrwx permission...

Any ideas? If its needed i can post my httpd.conf and more info...

I tried everything, its driving me crazy and i need it to work.

ls -l on /home ?

Offline

#4 2008-01-17 18:13:19

newcar
Member
From: Brasil
Registered: 2008-01-10
Posts: 33

Re: Apache2 not following symbolic links [SOLVED]

Thanks VikM, i did it and worked just fine.

I thought i just had to give permission to the wwwroot folder, cause httpd process would go straight to it; now i see its not like that.

Thx a lot, thx quad3d@work too.

Offline

#5 2008-09-29 14:24:53

Alp
Member
Registered: 2008-09-27
Posts: 85

Re: Apache2 not following symbolic links [SOLVED]

I have the same problem and can't find a proper solution.

http://localhost/ shows me a directory listing but the symlink to a project in my home folder does not show up. All folders from /home to the project path have read flags for each user. The http user is in the group of my user. And additionally the symlinks option in httpd.conf is enabled.

Any ideas?

Offline

#6 2008-10-01 02:00:25

Alp
Member
Registered: 2008-09-27
Posts: 85

Re: Apache2 not following symbolic links [SOLVED]

Got it: i had to give +x on /home/$USER

Offline

Board footer

Powered by FluxBB