04-25-04 12:33 AM
"DesignGuy" <dontbother@nowhere.com> schreef in bericht
news:DLBic.15996$cF6.641343@attbi_s04...
> 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
For all I can tell, .htaccess makes you loose SymLinksIfOwnerMatch.
Changing to 'Options +ExecCGI' might save your day
http://httpd.apache.org/docs-2.0/mod/core.html#options
> 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.
I don't like .htaccess, not to mention rewrite in there ...
Rewrite is known to cluds with other directives, like (script)alias and IIRC
some mod_mime suff; adding [PT] to the and of the RewriteRule might make
a
difference.
HansH
[ Post a follow-up to this message ]
|