PDA

View Full Version : .cgi script outside cgi-bin


bburn
27th May 2007, 21:10
Hello,

i try to run a cgi script outside of the cgi-bin dir.

Can you please tell me how to make it?

Regards,

Bjoern

falko
28th May 2007, 18:16
Add a line like this to your Apache Directives field in ISPConfig:

ScriptAlias /cgi-bin/ /path/to/your/cgi-bin_directory/

bidevi
2nd June 2007, 22:53
To get cgi-scripts running somewhere outside the cgi-bin I did the following things.

In httpd.conf, somewhere halfway the file, I found a paragraph saying:

<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride
Order allow,deny
Allow from all
</Directory>

The above isn't important for what you want, but I just chose this as a spot below which in my case I added some new lines.

Let's assume that you want to run a cgi-script inside the following directory:

/var/www/html/eggplant

Add these lines in the httpd.conf file:

<Directory "/var/www/html/eggplant">
Options Indexes MultiViews ExecCGI
</Directory>

Restart the Apache server:
/etc/init.d/httpd restart

Now you may run cgi-scripts inside the directory eggplant.

If necessary, repeat the permissions of your working scripts inside the cgi-bin.