LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2005, 04:47 AM   #1
bnj
Member
 
Registered: Apr 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 70

Rep: Reputation: 16
Forbidden access to soft link on apache web server


Hello,

I have installed an apache web-server on my PC. It works quite fine.
The homedir of the server is /srv/www/htdocs/
The main web page that I want to be accessible is in /srv/www/htdocs/main.1.0/
It is accessible via http://mypc/main.1.0/. This works very well.
I would like to set a link in the same directory on main.1.0. So I typed:

# cd /srv/www/htdocs/
# ln -si main.1.0/ link

But, if I try to access my website via http://mypc/link/, I get an error page:

----- error page -----
Forbidden

You don't have permission to access /link on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.50 (Linux/SUSE) Server at mapc15.epfl.ch Port 80
----- end of error page -----

permissions on main.1.0 and link are:
lrwxrwxrwx 1 root root 5 May 3 11:27 link -> main.1.0/
drwxr-xr-x 19 instuser users 1.4K Dec 21 08:49 main.1.0


Why why why? How can I setup such a link?

Thank you in advance for your replies.

Benjamin
 
Old 05-03-2005, 05:29 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
You may have to enable the FollowSymLinks option for your document root in your configuration file. Something like this:
Code:
<Directory /srv/www/htdocs/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
</Directory>
Note that this is an example and it would probably not work well for you if you copy it straight over to your own system. Add "FollowSymLinks" to the Options line and also "Indexes" if you don't have an index file in the target directory.

HÃ¥kan
 
Old 05-03-2005, 05:36 AM   #3
jaws_tas
LQ Newbie
 
Registered: Jan 2005
Posts: 25

Rep: Reputation: 15
links are fine with apache, as long as the directory they link to has the right permissions AND the virtual host you are using is configured to allow following of symlinks. In other words, check the httpd.conf file contains (under the relevant virtual host sections Directory sub-section):
Code:
Options FollowSymLinks
 
Old 05-03-2005, 08:14 AM   #4
bnj
Member
 
Registered: Apr 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 70

Original Poster
Rep: Reputation: 16
Thank you for your help, guys.
The file that I actually had to exit was /etc/apache2/default-server.conf

Best regards.
 
  


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
Apache web access "Forbidden" wswartz Linux - Software 21 10-27-2011 10:52 AM
Forbidden access to apache server wisdom Linux - Software 2 12-25-2004 09:29 PM
apache web server default page link tuxrules Linux - Newbie 9 07-10-2004 05:22 PM
403 Forbidden access to web with php and cgi scripts tonyboy Linux - Software 3 03-17-2004 07:45 AM
Apache Web Server - access from the www vesta41 Linux - Software 8 01-07-2004 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:56 PM.

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