I have a Rails 4 app that has some views that post to Perl cgi scripts. The perl scripts are accessed via a symbolic link to a folder called "cgi-bin". When I navigate to a perl script through the symbolic link they are rendered as text instead of executed (ie: localhost:3000/cgi-bin/test.cgi), however when I access them directly they execute without issue (ie. localhost/path/to/cgi-bin/test.cgi).
I am using apache2 on os x. In the directory localhost/path/to/ I have an .htaccess file that contains the following:
# General Apache options AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI
I have the exact same lines in the .htaccess file that I have in localhost:3000/
I have also uncommented the AllowOverride all in httpd.conf.
The are no errors in apache's error log. When I access the direct link to test.cgi a new line is appended to apache's access log, when I access the script through the symbolic link (and it is rendered as text), there is no line appended to the access log.
Any idea why this error occurs? This setup worked fine in a previous version of rails of OS X, but recently I upgraded to Mavericks and figured I should update the Rails application to v4.0 as well.
Update - I've debugged a bit more and found that the directives in the htaccess file are not being honored. When I added authentication to the htaccess file I was still able to access an html file in the directory and when I added a redirect rule, I was not redirected. It seems this is the problem I need to fix, although I'm not sure how to go about it.