Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a symlink in my main htdocs directory /home/www/example.com/htdocs:

index.php
cms (symlink)

lrwxrwxrwx 1 apache myuser 32 May 22 15:33 cms -> /home/www/xyz-cms/https/cms/

However, when I visit my site at http://www.example.com/cms I get a 404 not found.

Am I missing a step to get this working?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

From the Apache 2 documentation,

For security reasons, Apache will follow symbolic links only if the Options setting for the relevant directory includes FollowSymLinks or SymLinksIfOwnerMatch.

So you need to make sure you have FollowSymLinks in the Options setting, probably as part of the <Directory> container.

For example,

<Directory /home/www/example.com/htdocs>
Options Indexes FollowSymLinks
</Directory> 

Also, you'll need to make sure the permissions on /home/www/xyz-cms/https/cms/ allow access to the user Apache is running as.

share|improve this answer
add comment

Your Answer

 
discard

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.