Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can any one please help me regarding to the Soft link folder / file browsing problem in APACHE .
I have created a folder on the /var/www/html named "test" and created one home.html . Now I have created one soft link of home.html file into the test folder named test.html and set 777 file-folder permission .
Its showing error --->> "Forbidden You don't have permission to access /test/test.html on the server"
You have to add "FollowSymLinks" in the Options directive, either for the DocumentRoot, or for the specific directory if you don't want to allow symlinks for the whole server
<VirtualHost 192.168.1.50:80>
ServerAdmin root@helo.mylinux.com
DocumentRoot /var/www/html
ServerName helo.mylinux.com
ErrorLog logs/helo.mylinux.com-error_log-lin
CustomLog logs/helo.mylinux.com-access_log-lin common
<Directory "/var/www/html/test">
options Indexes Includes FollowSymLinks SymLinksifOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
** I have tested also " options Indexes Includes FollowSymLinks " ,, but no result .
[Wed Apr 01 17:26:48 2009] [error] [client 192.168.1.50] Symbolic link not allowed or link target not accessible: /var/www/html/test/test.html, referer: http://192.168.1.50/test/
[Wed Apr 01 17:46:13 2009] [error] [client 192.168.1.50] Symbolic link not allowed or link target not accessible: /var/www/html/test/test.html, referer: http://192.168.1.50/test/
[Wed Apr 01 17:46:14 2009] [error] [client 192.168.1.50] Symbolic link not allowed or link target not accessible: /var/www/html/test/test.html, referer: http://192.168.1.50/test/
[Wed Apr 01 17:46:31 2009] [error] [client 192.168.1.50] Symbolic link not allowed or link target not accessible: /var/www/html/test/test.html, referer: http://192.168.1.50/test/
[Wed Apr 01 17:46:31 2009] [error] [client 192.168.1.50] Symbolic link not allowed or link target not accessible: /var/www/html/test/test.html, referer: http://192.168.1.50/test/
The syntax is right, that's why it's strange that apache does not follow symlinks.
I'm staring to think that you are not editing the correct file. Is that <VirtualHost ...> snippet you've posted part of httpd.conf, or it's in another file included by an "Include ..." directive in httpd.conf?
options Indexes Includes FollowSymLinks SymLinksifOwnerMatch
Probably, SymLinksifOwnerMatch is overriding FollowSymLinks. The symlinked directory is owned by root, so the owner does not match and linking is denied.
Try removing SymLinksifOwnerMatch from your config and restart Apache.
Actually I want the document root path would be /var/www/html . But there would be one folder where I want to use for soft link purpose , that's why I used <Directory "/var/www/html/test"> . Here I m able to browse other files except symbolic linking files .
DocumentRoot /var/www/html
<Directory "/var/www/html">
options Indexes Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/html/test">
options +FollowSymLinks
</Directory>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.