LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-18-2007, 03:23 AM   #1
chamu
LQ Newbie
 
Registered: May 2007
Posts: 4

Rep: Reputation: 0
Red face Httpd problem : symbolic links not followed


hi i have been trying to configure web server httpd with cricket bandwidth monitor, have symbolic links to the cricket directory and have the following lines in my httpd.conf file


<Directory "/var/www/html">
Options Indexes +FollowSymLinks ExecCGI
</Directory>

but it still returns sym links not follwed in httpd error log,
 
Old 05-18-2007, 03:30 AM   #2
digitalnerds
Member
 
Registered: May 2007
Distribution: Debian
Posts: 103

Rep: Reputation: 15
Are you running apache chrooted? .. it might be a problem with that if yes and you would need to make the sylinks relative not absolute.
To exemplify:

instead of
Code:
ln -s /path/to/file /path/for/symlink
try
Code:
cd /path/for
ln -s ../../to/file symlink
 
Old 05-18-2007, 05:39 AM   #3
chamu
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Red face httpd sym links problem

the answer is yes and the links are already relative as per ur suggestion, could there be a global configuration which is blocking sym links?. which is not in httpd.conf?
 
Old 05-18-2007, 06:42 AM   #4
digitalnerds
Member
 
Registered: May 2007
Distribution: Debian
Posts: 103

Rep: Reputation: 15
Where is the cricket directory located? .. is it under the /var/www/html ? It's ahrd to really help when you dont know the setup. Have you tried without +?

Edit: if your symlink target dir is outside the directory for which you enabled FollowSymLinks your apache will not be able to follow the symlink.
Be careful with the directory-path arguments: They have to literally match the filesystem path which Apache uses to access the files. Directives applied to a particular <Directory> will not apply to files accessed from that same directory via a different path, such as via different symbolic links.

Regards
Andy

Last edited by digitalnerds; 05-18-2007 at 06:46 AM.
 
Old 05-18-2007, 08:05 AM   #5
chamu
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Red face httpd sym links problem

the cricket directory is in /home/cricket/cricket , the links from /var/www/html are to ths directory .i also have tried without the + to no avail i also have
added
<Directory /home/cricket/cricket>
Options FollowsymLinks ExecCGI
</Directory>
but no change again!
 
Old 05-18-2007, 08:29 AM   #6
digitalnerds
Member
 
Registered: May 2007
Distribution: Debian
Posts: 103

Rep: Reputation: 15
I wasnt clear enough. You may add a new directive for /home/cricket/cricket it doesnt matter. Your /var/www/html will not be able to follow links outside /var/www/html. In your case apache will refuse to follow symlinks inside /var/www/html that leads to /home/cricket/cricket. I repeat myself "if your symlink target dir is outside the directory for which you enabled FollowSymLinks your apache will not be able to follow the symlink." So you do not need to add:
Code:
<Directory /home/cricket/cricket>
Options FollowsymLinks ExecCGI
</Directory>
because the most you will is to specify that all symlinks inside /home/cricket/cricket are to be followed within the boundaries of the PATH apache uses to access those files.

Regards
Andy
 
Old 05-20-2007, 08:19 PM   #7
systemnotes
LQ Newbie
 
Registered: Apr 2007
Distribution: RHEL
Posts: 29

Rep: Reputation: 15
Quote:
Originally Posted by digitalnerds
I wasnt clear enough. You may add a new directive for /home/cricket/cricket it doesnt matter. Your /var/www/html will not be able to follow links outside /var/www/html. In your case apache will refuse to follow symlinks inside /var/www/html that leads to /home/cricket/cricket. I repeat myself "if your symlink target dir is outside the directory for which you enabled FollowSymLinks your apache will not be able to follow the symlink." So you do not need to add:
Code:
<Directory /home/cricket/cricket>
Options FollowsymLinks ExecCGI
</Directory>
because the most you will is to specify that all symlinks inside /home/cricket/cricket are to be followed within the boundaries of the PATH apache uses to access those files.

Regards
Andy
I don't know if you are running the 2.6 kernel with SELinux enabled, but here is something else to consider:

Don't forget to also check SELinux permissions on the directory with
ls -Z /home/cricket/cricket

http://systemnotesorg.blogspot.com/2...otes-http.html

You may have to run
chcon -R --reference /var/www/html /home/cricket/cricket
to allow the web server to read the files.
 
Old 05-28-2007, 08:59 AM   #8
chamu
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Question httpd sym links problem

there is anew twist to the saga, i have just made some adjustments, i had a link pointing to another link in the cricket directory
as in from /var/www/html/cricket to /home/cricket/cricket the second cricket directory is actually a link within the /home/cricket directory to the actual directory- cricket-1.0.5so i suppose thats where the problem was coming from, now i have removed this sym link and have a link from /var/www/html to /home/cricket/cricket-1.0.5 which is the actual cricket config directory,
the symlinks not allowed error in th logs is gone but now the problem is the cgi scripts like grapher.cgi in cricket-1.0.5 are not running
, from the browser u get a text file instead of a graph

i have got +ExecCGI in my httpd.conf
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Apache and Symbolic Links gjagadish Linux - Security 1 08-12-2006 03:24 AM
Symbolic Links suavecu Linux - Software 1 01-11-2006 10:04 PM
Problem with Samba, FAT32 and Symbolic links kolt Linux - Networking 3 10-22-2004 03:43 AM
"Too many levels of symbolic links" Problem Corallis Linux - Newbie 5 07-12-2004 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration