I have a site that is setup with "Economy Linux Hosting with CPanel".
I have created a .htaccess file in the web root directory (public_html). The .htaccess file looks like this:
DirectoryIndex cgi-bin/index.cgi AddHandler cgi-script .cgi Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch -Indexes
In my cgi-bin folder, I have a file named "dispatch.cgi". I'd like to create a symlink to that file like this:
ln -s dispatch.cgi index.cgi
However, the symlink will not work. The server throws an error.
If I rename dispatch.cgi to index.cgi, everything works great. However, I'd rather use the symlink. Is this possible? Might the server's httpd file be overriding me or something?
Note that I've attempted to allow the use of symlinks in my .htaccess file. I also added a second .htaccess file to cgi-bin with the same directives, but this didn't help.
Solved! Go to Solution.
I'm having the same problem with the symlink. Please post back here if you get this working. I've attempted to call support but the wait times seem extraordinarily long lately.
There shouldn't be any reason you can't create the symlink via an .htaccess file, but if it fails there won't be an error generated to identify why. Have either of you tried creating your symlink through SSH instead? This is usually the best method, especially since you'll see an error message generated if for any reason the link continues to fail.
Knowing more about what's causing the symlink to fail would help other members suggest a solution if you still needed the assistance.
I just realized I missed your last post while I was writing my own. That is actually not true. All cPanel shared hosting plans should support symlinks. I have even verified this with a member of our Hosting tech team who has confirmed this on his own test account.