This is a discussion on Linking to directory outside document root within the Apache Web Server forums, part of the Web Server and Related Forums category; I have files that I want to serve up in apache on linux. Running Apache/2.2.2 (Fedora) the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have files that I want to serve up in apache on linux.
Running Apache/2.2.2 (Fedora) the files are in a folder call fs in my home dir /home/vsite /home/vsite/fs drwxr-xr-x 2 vsite vsite 12288 Mar 12 07:50 fs an example file -rw-r--r-- 1 vsite vsite 3533 Mar 12 12:55 file1.html The DocumentRoot is : DocumentRoot "/var/www/html" I made a link inside /var/www/html lrwxrwxrwx 1 root root 14 Mar 12 13:01 fs -> /home/vsite/fs I try to go to the file1.html as follows: http://10.3.3.131/fs/file1.thml and get forbidden ..... Forbidden You don't have permission to access /fs/ on this server. -------------------------------------------------------------------------------- Apache/2.2.2 (Fedora) Server at 10.3.3.131 Port 80 I also have this in my httpd.conf <Directory "/home/vsite/fs"> Order allow,deny </Directory> <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> Also I tried to change the DocumentRoot to "/home/vsite/fs" but apache won't start when I have DocumentRoot "/home/vsite/fs" solving either of the above would be fine thanx Roger |
|
|||
|
"spacemancw" <spacemancw@yahoo.com> wrote in message
news:2f595b9b-8379-44e4-9cc8-931c248b2d89@y77g2000hsy.googlegroups.com... >I have files that I want to serve up in apache on linux. > Running Apache/2.2.2 (Fedora) > > the files are in a folder call fs in my home dir /home/vsite > > /home/vsite/fs > > drwxr-xr-x 2 vsite vsite 12288 Mar 12 07:50 fs > > an example file > -rw-r--r-- 1 vsite vsite 3533 Mar 12 12:55 file1.html > > The DocumentRoot is : > DocumentRoot "/var/www/html" > > I made a link inside /var/www/html > lrwxrwxrwx 1 root root 14 Mar 12 13:01 fs -> /home/vsite/fs > > I try to go to the file1.html as follows: > > http://10.3.3.131/fs/file1.thml and get forbidden ..... > > Forbidden > You don't have permission to access /fs/ on this server. > -------------------------------------------------------------------------------- > Apache/2.2.2 (Fedora) Server at 10.3.3.131 Port 80 > > > I also have this in my httpd.conf > > <Directory "/home/vsite/fs"> > Order allow,deny > </Directory> > The above section is incomplete - you've told apache what order your allow/deny directives will appear, but you haven't used any. add an allow directive: <Directory "/home/vsite/fs"> Order allow,deny Allow from all </Directory> |
| Thread Tools | |
| Display Modes | |
|
|