Link file not opening on webserver
Les Mikesell
lesmikesell at gmail.com
Thu May 24 13:17:25 UTC 2007
Paul Ward wrote:
> Hello,
>
> Can anyone tell me how to link a file from from my home directory to
> /var/www/html so it can be a acccessed remotley.
>
> I used the following to link the file which worked fine.
>
> # ln -s myfile /var/www/html/
> # ls -l /var/www/html
> lrwxrwxrwx 1 root root 23 May 13.19 myfile.html -> /home/user/myfile.html
>
> When going to my webserver http://myfile.html does not open up I get a
> permisson problem how do I get round this?
>
> -----------------------------------------------------------------------------------------------------
>
> Forbidden
>
> You don't have permission to access myfile.html on this server
> -----------------------------------------------------------------------------------------------------
>
>
> I did a lsattri but this did not show anything unusual and SELinux is off.
Apache has an option to follow symlinks or not. Be sure it is on in
your /etc/httpd/conf/httpd.conf at least for the relevant area. As an
alternative, if you have the userdir option enabled you can create a
directory named public_html in your home directory and refer to files
there as ~user/filename. In any case the path to the file must have at
x permission for the apache user or group and the file itself must be
readable by the apache user or group.
--
Les Mikesell
lesmikesell at gmail.com
More information about the fedora-list
mailing list