While the title of this question matches an already asked question, in my case I already set Options +FollowSymLinks.

The setup is the following: my hosting setup includes htdocs/ directory that is the default document root for HTTP websites and htdocs-secure that is for HTTPS. They are meant for sites that need a different HTTPS version.

In case both share the same files I create a link from htdocs-secure to htdocs by ln -s htdocs htdocs-secure but here comes the problem! Log still says Symbolic link not allowed or link target not accessible: /path/to/htdocs-secure

1 Answer
1

I guess that this problem is due to the fact that your DocumentRoot already is a symlink. Therefore the <Directory> clause won't match, as there is no real directory of that name, only a symlink. Perhaps you can set the FollowSymLinks option for /path/to, but you'll have to try whether that works.

Is there any reason against making the htdocs directory itself the DocumentRoot for both HTTP and HTTPS? After all, when you symlink them, they will always look the same, so you might as well use the same directory in the first place.

The reason is that I use a macro to create virtual hosts. Nothing more. So I want the hosting platform to grant the possibility of hosting different files for HTTP/HTTPS and allow to merge the two sites into a single one. Creating a new macro "HostingSSLWithSameSite" is supposed to work
–
djechelonOct 1 '12 at 11:04