Apache CGI problems
SuSE 10
Apache2 I just enable cgi on my apache2 server and when I point a browser to the script it tries to download it instead of executing it. It works if I use the extension .cgi but .pl will only try to download, both files are identical with the exception of the extension. I have tried adding "AddType cgi-script .pl" to the mod_mime0defaults.conf as well as the mime.types file. I also tried adding AddHandler to the directory directive. Please help, I have been fighting this for hours and am dumbfounded. Thanks, |
Can you post the section of your httpd.conf file where you used the AddHandler directive? It should have worked - here is an example for a Bugzilla box (I added the .pl to the AddHandler directive only to show the syntax):
Code:
<Directory /usr/local/bugzilla-2.20.1> |
This is what I have listed in the default-server.conf file. It is included
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/" # "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/srv/www/cgi-bin"> AddHandler cgi-script .pl AllowOverride None Options +ExecCGI -Includes Order allow,deny Allow from all </Directory> |
That's odd - the one I posted above works for .cgi or .pl files. The only way I could make it stop was to add a .htaccess file to the directory to deny access to .pl files. Do you use .htaccess files at all?
|
I am using it, in other directories, not in this one.
|
Apart from confirming that the file is executable by whatever user Apache is running as, have you had a look at http://httpd.apache.org/docs/2.0/how...l#troubleshoot?
|
rights are properly set, -rwxr-xr-x. I will review the docs, thanks for your help.
|
All times are GMT -5. The time now is 09:22 PM. |