Web Hosting Talk







View Full Version : Plesk: CGI program won't work.


mrzippy
07-28-2002, 05:27 PM
I just created a domain using plesk, but I'm unable to get a cgi program working for it.

For example, http://www.gridops.com/email/epostalservice.cgi

For me, this just pops up a download dialogue box instead of running the cgi program. When the domain was created I did check the "allow cgi access" checkbox.

Any ideas?

cbaker17
07-28-2002, 05:30 PM
Did you upload using ascii?

mrzippy
07-28-2002, 05:32 PM
Yes.

SpiralHost
07-28-2002, 05:37 PM
Unless you have changed your server settings you need to run cgi scripts in the cgi-bin.

cbaker17
07-28-2002, 05:38 PM
oh i was assuming he knew that

mrzippy
07-28-2002, 05:38 PM
Originally posted by SpiralHost
Unless you have changed your server settings you need to run cgi scripts in the cgi-bin.

How can I change my server settings so that I can run cgi programs outside from the cgi-bin?

Thanks!

goodness0001
07-28-2002, 06:24 PM
add this to the first line of the script:

#!/usr/bin/perl -w

Also dont chmod past 755.

esdjco
07-28-2002, 07:45 PM
Try the plesk forums. They seem pretty alive and check the FAQ. They might have something there. What do your log files say?

SpiralHost
07-29-2002, 06:23 AM
To do this you have to modify the httpd.conf file - there will be a section in this file that's commented out -

# AddHandler allows you to map certain file extensions to "handlers",
# actions unrelated to filetype. These can be either built into the server
# or added with the Action command (see below)
#
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
# AddHandler cgi-script .cgi

remove the "#" in front of the last line, save the file, restart apache.

Rich2k
07-29-2002, 08:23 AM
Check your error_log too, it will give you much more information as to what's going wrong.

frozen
07-29-2002, 09:59 AM
Originally posted by SpiralHost
To do this you have to modify the httpd.conf file - there will be a section in this file that's commented out -

# AddHandler allows you to map certain file extensions to "handlers",
# actions unrelated to filetype. These can be either built into the server
# or added with the Action command (see below)
#
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
# AddHandler cgi-script .cgi

remove the "#" in front of the last line, save the file, restart apache.

That would be correct. I believe you can do this per domain too, by editing the vhost.conf in the domains conf directory.