Results 1 to 10 of 12
I'm running Apache 2.2.8 on Fedora 7. I created a symlink in my DocumentRoot, and the permissions are 755 on the directory. In my httpd.conf, I have allowed FollowSymLinks, but ...
- 07-12-2008 #1Just Joined!
- Join Date
- Sep 2007
- Location
- Lafayette, IN
- Posts
- 83
[SOLVED] Apache won't follow symlinks
I'm running Apache 2.2.8 on Fedora 7. I created a symlink in my DocumentRoot, and the permissions are 755 on the directory. In my httpd.conf, I have allowed FollowSymLinks, but when I try to view the page, I get 403ed and error_log has "Symbolic link not allowed or link target not accessible"
I've Googled the heck out of this, but I haven't been able to find a solution that works. SELinux is disabled, so that can't be the problem. Any suggestions?
Code:<Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/archive/www/html"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>
- 07-15-2008 #2Just Joined!
- Join Date
- Jul 2008
- Posts
- 8
Post a ls -l of the source and target directories. pls.
- 07-15-2008 #3Just Joined!
- Join Date
- Jun 2008
- Posts
- 11
+1 on this one
My situation is basicly the same, though it works on a symlink that is in the document root, but not on symlinks elsewhere in the hierarchy.
httpd.conf has the "same" settings as Ben:
DocumentRoot /www
..
<Directory /www/>
Options -Indexes Includes FollowSymLinks MultiViews
AllowOverride None Options
Order allow,deny
Allow from all
</Directory>
File: -rwxr-xr-x 1 root root 1344 2008-07-15 15:49 q.gif
Link1: lrwxrwxrwx 1 root root [..] /www/q.gif -> images/test/q.gif
Link2: lrwxrwxrwx 1 root root [..] /www/images/q.gif -> test/q.gif
In firefox 3:
* http://server/q.gif ..shows the gif (304 in apache log)
* http://server/images/q.gif ..gives "Not Found (404 in apache log)
Don't mean to hijack this thread, but I believe these problems might have the same solution
- 07-15-2008 #4Just Joined!
- Join Date
- Sep 2007
- Location
- Lafayette, IN
- Posts
- 83
target (from DocumentRoot (/archive/shared/www/html/ )):
0 lrwxrwxrwx 1 bcotton archive 48 2008-07-12 14:54 jennifer_and_nick -> /archive/shared/photos/family/jennifer_and_nick/
source:
[1156 bcotton@boone /archive/www/html ]$ ls -al /archive/shared/photos/family/jennifer_and_nick/
total 16
drwxr-xr-x 4 bcotton archive 4096 2008-07-10 20:42 .
drwxr-xr-x 3 bcotton archive 4096 2008-06-26 00:16 ..
drwxr-xr-x 2 bcotton archive 4096 2008-06-26 00:17 shower
drwxr-xr-x 2 bcotton archive 4096 2008-07-10 20:42 wedding
Unlike alfmarius, it doesn't work in document root either, although in my Googling I did see that was a common issue.
- 07-15-2008 #5Just Joined!
- Join Date
- Jul 2008
- Posts
- 8
in your httpd.conf file, what do you have set for the following values?
Code:User http Group http
thanks.
- 07-15-2008 #6Just Joined!
- Join Date
- Sep 2007
- Location
- Lafayette, IN
- Posts
- 83
- 07-15-2008 #7Just Joined!
- Join Date
- Jul 2008
- Posts
- 8
Glad it worked! I've done an apache setup about a million times...and each time I do it it's been long enough for me to forget all the little config changes it needs.
cheers
philip
- 07-16-2008 #8Just Joined!
- Join Date
- Jun 2008
- Posts
- 11
Nice you got it working Ben!

..unfortunately I didn't
I did some more testing, and i must say I'm maby more confused now, because when i tried to reconstruct my problem with new directories and links i couldn't! Here is my newst test results:
The stuff that doesn't work:
I reconstructed the scenario with new dirs, and then it works!Code:> pwd /data/www > ls -ld /data/www/ drwxrwxrwx 14 www-data www-data 4096 2008-07-16 12:55 /data/www/ > ls -ld /data/www/GameBase/ drwxr-xr-x 7 www-data www-data 4096 2008-07-16 12:53 /data/www/GameBase/ > ls -ld /data/www/GameBase/images/ drwxr-xr-x 9 www-data www-data 4096 2008-07-16 12:51 /data/www/GameBase/images/ > ls -ld /data/www/GameBase/images/p.gif -rwxr-xr-x 1 www-data www-data 1344 2008-07-16 12:51 /data/www/GameBase/images/p.gif > ln -s /data/www/GameBase/images/ > ls -l images lrwxrwxrwx 1 www-data www-data 26 2008-07-16 12:59 images -> /data/www/GameBase/images/ http://server/GameBase/images/p.gif -> works! log: "GET /GameBase/images/p.gif HTTP/1.1" 304 - http://server/images/p.gif -> does not work! log: "GET /images/p.gif HTTP/1.1" 404 283
To my eyes these are identical cases, but one work and the other doesn't. Please help me out, see what i cannot see!Code:> ls -ld /data/www/test1/ drwxr-xr-x 3 www-data www-data 4096 2008-07-16 12:14 /data/www/test1/ > ls -ld /data/www/test1/test2/ drwxr-xr-x 3 www-data www-data 4096 2008-07-16 12:20 /data/www/test1/test2/ > ls -ld /data/www/test1/test2/p.gif -rwxr-xr-x 1 www-data www-data 1344 2008-07-16 12:14 /data/www/test1/test2/p.gif > ln -s /data/www/test1/test2/ > ls -l test2 lrwxrwxrwx 1 www-data www-data 22 2008-07-16 13:07 test2 -> /data/www/test1/test2/ http://server/test1/test2/p.gif -> works! log: "GET /test1/test2/p.gif HTTP/1.1" 304 - http://server/test2/p.gif -> works! log: "GET /test2/p.gif HTTP/1.1" 304 -
- 07-16-2008 #9Just Joined!
- Join Date
- Sep 2007
- Location
- Lafayette, IN
- Posts
- 83
You're right. From what I can see, it looks like these two cases should behave identically. I assume your httpd.conf has both User and Group set to www-data?
- 07-16-2008 #10Just Joined!
- Join Date
- Jun 2008
- Posts
- 11



