Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I went through these steps in order to make a symlink directory to use outside of lampp htdocs.

$ mkdir test
$ chmod 777 test
//test is now in /home/Dropbox/test/
//I put an index.html with 777 perms in it.
$ cd /opt/lampp/htdocs/
$ sudo ln -s /home/Dropbox/test/ /opt/lampp/htdocs/$USER
//my user appears as symlink directory in htdocs.
$ /opt/lampp/lampp stop
$ /opt/lampp/lampp start
//lampp is now restarted

I type in localhost/myusername and get a 404 error... object not found.

Note that I can create regular directories and .html/.php files in the htdocs directory, but I cannot do any symlink directories or .html/.php files, they will not load.

Thank you for input!

httpd conf (only the parts involving SymLinks)

<Directory />
    Options FollowSymLinks
    AllowOverride None
    #Order deny,allow
    #Deny from all

<Directory "/opt/lampp/htdocs/">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    # The Options directive is both complicated and important.  Please see
    # for more information.
    #Options Indexes FollowSymLinks
    # XAMPP
    Options Indexes FollowSymLinks ExecCGI Includes

    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #AllowOverride None
    # since XAMPP 1.4:
    AllowOverride All

    # Controls who can get stuff from this server.
    Order allow,deny
    Allow from all



$ tail -f error_log 
[Fri Dec 23 13:55:50 2011] [error] [client] Symbolic link not allowed or link target not accessible: /opt/lampp/htdocs/*myusername*
[Fri Dec 23 13:56:02 2011] [notice] caught SIGTERM, shutting down
[Fri Dec 23 13:56:08 2011] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Fri Dec 23 13:56:08 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Dec 23 13:56:08 2011] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Dec 23 13:56:08 2011] [notice] Digest: generating secret for digest authentication ...
[Fri Dec 23 13:56:08 2011] [notice] Digest: done
[Fri Dec 23 13:56:09 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Dec 23 13:56:09 2011] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Dec 23 13:56:09 2011] [notice] Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0c PHP/5.3.8 mod_apreq2-20090110/2.7.1 mod_perl/2.0.5 Perl/v5.10.1 configured -- resuming normal operations


$ tail -f access_log - - [23/Dec/2011:13:41:27 -0500] "GET /work HTTP/1.1" 403 1111 - - [23/Dec/2011:13:41:27 -0500] "GET /work HTTP/1.1" 403 1111 - - [23/Dec/2011:13:41:28 -0500] "GET /work HTTP/1.1" 403 1111 - - [23/Dec/2011:13:55:47 -0500] "GET / HTTP/1.1" 302 - - - [23/Dec/2011:13:55:47 -0500] "GET /xampp/ HTTP/1.1" 200 588 - - [23/Dec/2011:13:55:47 -0500] "GET /xampp/head.php HTTP/1.1" 200 1362 - - [23/Dec/2011:13:55:47 -0500] "GET /xampp/navi.php HTTP/1.1" 200 2290 - - [23/Dec/2011:13:55:47 -0500] "GET /xampp/start.php HTTP/1.1" 200 786 - - [23/Dec/2011:13:55:47 -0500] "GET /favicon.ico HTTP/1.1" 200 30894 - - [23/Dec/2011:13:55:50 -0500] "GET /work HTTP/1.1" 403 1111

Permissions of /opt/lampp/htdocs/

drwxr-xr-x 4 nobody root 4096 2011-12-23 13:32 htdocs

Permissions of /opt/lampp/htdocs/*myusername*

lrwxrwxrwx 1 root root 39 2011-12-23 13:12 myusername

Permissions of /home/Dropbox/test/

drwxr-xr-x 2 work work 4096 2011-12-23 13:10 myusername

share|improve this question
What are the permissions on /home/Dropbox? – Mark Wagner Dec 23 '11 at 20:12
Hi, thanks for the response. The permissions for Dropbox are drwx------ so it seems the owner is the only user to access it. Should this at least be granted for everyone to read it recursively? – user1062058 Dec 24 '11 at 3:53
up vote 2 down vote accepted

This would suggest that the FollowSymLinks is is not present within stanza. Here is an example, taken from here:

<Directory /usr/local/httpd/htdocs>
Options Indexes FollowSymLinks

Pending verification of apache configuration, (which I think you should paste in), this is the most likely answer.

EDIT: After reading your response to embobo, I went and replicated the problem with my server:

[Fri Dec 23 23:03:58 2011] [error] [client] Symbolic link not allowed or link target not accessible: /var/www/html/testsym

I suggest the following settings on test's parent

chmod go+x /home/Dropbox

So that the Dropbox directory can have execute permissions for group and other.

share|improve this answer
Thanks for the response. It has this by default: Options FollowSymLinks - is that wrong? – user1062058 Dec 23 '11 at 18:37
That seems correct, depending on how you setup your site. Can you paste your apache configuration as well as the tail output from the access_log and error_log file into your post? – Rilindo Dec 23 '11 at 18:41
All the info you requested is posted. It seems "[error] [client] Symbolic link not allowed or link target not accessible: /opt/lampp/htdocs/*myusername*" has something to do with the problem. THanks for the help thus far. – user1062058 Dec 23 '11 at 18:59
It looks like that was the problem, but the restart should have fixed it. Thinking about it, it is odd that you would get a 404 message, not a 403 message. Run tail -f on both the access_log and error_log file and then to attempt to access that user again. From there, update the question with what you see from the resulting output. – Rilindo Dec 23 '11 at 21:17
Thanks! The chmod worked! I have a feeling that this question will be very useful to the large quantity of people asking about this on other sites with no solutions. – user1062058 Dec 27 '11 at 15:58

Well, I'm unsure about the default settings for that package - but typically, symlink following is disabled by default in Apache for security reasons.

Add this to your config, in a context that applies to the location where the symlinks reside:

Options +FollowSymLinks
share|improve this answer
I posted more information in the post if that helps. Thanks. – user1062058 Dec 23 '11 at 19:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.