Symbolic Link with HTTP
Good Day All
I am having an issue viewing the symbolic link i created. I created a link to my web folder (using fedora 14). When i try to view it in a browser , i get the error: 403 Forbidden, You do not have permission to access the "file" on the server. I did the following: I added the below to my /etc/httpd/conf/httpd.conf file " <Directory “path to directory like /var/www/html/folder”> options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews AllowOverride All Order allow,deny Allow from all </Directory> " "then i restarted httpd" However that did not work Any help would be greatly appreciated Regards, Brian |
I don't think the webserver has permissions to follow symlinks that are not in the webserver directory path defined in <Directory ...></Directory>
|
Are you sure the folder you're sym-linking to has the proper permissions? What does it show for owner, group & permissions when you ls -l it? You need r-x or rwx for the 3rd set (public/other) unless it is owned by the web server's id or group. It's www-data on my Debian system, not sure if Fedora 14 uses the same id or if you've changed it.
--Bryan P.S. I know this technique works, because I've placed websites I maintain in my home folder and symlink from /var/www into /home/me/www/folder and it works great. |
Hey,
Well first off I hope this isn't literal ;) Code:
<Directory “path to directory like /var/www/html/folder Second what is the ownership/permissons of the directory the symlink is referancing? It will need to be something apache can read. If you don't know then issue a Code:
ls -la /var/www/html/folder Code:
chown -R apache:apache /var/www/html/folder Code:
chown -R www:www /var/www/html/folder Or you could chmod to something apache can read, but not write. Stay away from 777. |
It would help if we saw what the actual dir is, but I suspect an SELinux issue.
You may also want to consider this page https://httpd.apache.org/docs/2.2/mod/mod_userdir.html |
folder is called timetable
its in my home directory e.g. /home/bhall/Dropbox/timetable ...the permissions are drwxrwxrwx 2 apache apache 20480 Sep 16 00:26 timetable In /var/www/html folder i created the sym link timetable The permissions are: lrwxrwxrwx 1 root root 10 Sept 16 00:32 timetable -> /home/bhall/Dropbox/timetable (the way i am doing it is using dropbox to sync my files with another machine. |
All times are GMT -5. The time now is 06:38 PM. |