2

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?

kylex
  • 1,371
  • 5
  • 13
  • 18

1 Answers1

4

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.

EightBitTony
  • 9,211
  • 1
  • 32
  • 46