Forum Moderators: phranque

Message Too Old, No Replies

Running scripts outside cgi-bin - Apache

         

carparknz

3:10 am on Jul 10, 2005 (gmt 0)

10+ Year Member



Hi All
I've looked though most of the forum for this answer but could not find it , plus heaps of web sites. It may be simple config command but I can not get my head around it.
I've loaded my site onto a seperate PC running Apache under Windows XP Pro to try and run new scripts prior to loading to web site. It's all running and the site works OK . I can call all the hmtl pages and all the links work in all the directories. My problem is I have some *.cgi and *.pl scripts outside the cgi-bin that I can not get to run.(scripts in the cgi-bin work fine) I get a server reply of "forbidden" as I do not have permission to run this script.? Is there a AddHandler or Directory line I need to add to the config file. I don't want to put a .htaccess file in each directory. Plus I can not get the SSI to work. Some of you may see this a simple fix. Any help is greatly appreciated.
Regards
Colin

marcs

4:10 pm on Jul 10, 2005 (gmt 0)

10+ Year Member



To execute files with a .cgi extension outside the
cgi-bin, add :

AddHandler cgi-script .cgi

You may also need to add ExecCGI to your Options directive.

As to making SSI work (on .html files) :

AddOutputFilter INCLUDES .html

and add Includes to the Options directive.

Don't forget to restart Apache after you modify the config file.

carparknz

10:00 pm on Jul 10, 2005 (gmt 0)

10+ Year Member



Hi
I have done all this but still no joy. Question though, does it matter where in the config file these commands are. About half way in the file is:

<Directory "C:/home/mysite/www/cgi-bin/">
AllowOverride None
Options +All +ExecCGI
Order allow,deny
Allow from All
</Directory>

and near the end of the file is:

AddHandler cgi-script .cgi

As for SSI, I have the:

AddOutputFilter INCLUDES .html

But no Options directive.

For purpose of testing pages does:

AddOutputFilter INCLUDES .shtml .html .htm

work. Sorry to be such a non-nerd newbie, but this is a steep learning curve with Apache (still lots to learn)as I have most of it working.
Regards