Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite and running scripts outside CGI-BIN

Options FollowSymLinks or SymLinksIfOwnerMatch is off.... error

         

jjohnstn

10:23 pm on Apr 24, 2004 (gmt 0)

10+ Year Member



This problem is driving me nuts… I've done the usual Google search and nothing seems to fix it:

I'm trying to run Perl scripts outside the cgi-bin directory. Also, part of the site requires mod_rewrite. Server is RedHat, using Plesk control panel.

When running the script hello.pl from the browser it generates a 403 Forbidden error (a simple "hello" script). It runs fine from shell. When reviewing the error_log for the domain, I see:

"Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /home/httpd/vhosts/domain.com/httpdocs/hello.pl"

The vhost.conf for the domain contains:
<Directory /home/httpd/vhosts/domain.com/httpdocs>
php_admin_value open_basedir none
Options FollowSymLinks SymLinksIfOwnerMatch Includes
AllowOverride All
</Directory>

the .htaccess file in the /httpdocs folders contains:
Options FollowSymLinks ExecCGI Includes
AddHandler cgi-script .cgi
AddHandler server-parsed .html
RewriteEngine on
RewriteRule ^CTS([^.]+).*$ /foo/index.php?test=$1

In the .htaccess file if I remove the last two lines (RewriteEngine and RewriteRule) and hello.pl script runs fine, but then obviously the rewrite does not.

Any ideas?

hakre

2:42 pm on Apr 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



my shoot:

change

Options FollowSymLinks ExecCGI Includes

to

Options +FollowSymLinks +ExecCGI +Includes

and try again. this will prevent overwriting existing options which might be needed by your rewrite rule.

-hakre

bluntelk

7:16 am on May 13, 2004 (gmt 0)



I have the same kind of problem with Redhat + Plesk 7

the .htaccess additions of

Options +FollowSymLinks +ExecCGI +Includes

did not work.

i am getting the feeling that it is just a pure configuration problem, as the scripts i am trying to run (even a simple hello world script) are working fine on other servers.

i just do not know where/what to change to allow perl scripts to run.

Also, when i call the script from a web browser i just the source... so i know that apache is not executing it.

Help?