Help - Search - Members - Calendar
Full Version: Can I place CGI file somewhere else?
The Planet Forums > Control Panels > Plesk
jay711
I read thru the treads and found one tread saying that I have to place .cgi file under /cgi-bin. btw, I'm using PLESK.

I just install a message board ended with .cgi extension and the default is not under "/cgi-bin", so I need the web server to recognize the .cgi files under different directory. Is there a way to do this under PLESK?

thanks for the help.
afriend
Edit the httpd.conf file (try to search for it - its location depends on which Plesk version you have) and remove the comment in front of the line for:

AddHandler cgi-script .cgi

Restart Apache. This will let a CGI script execute outside of the cgi-bin directory. It will still run under the cgi wrapper, so it's not unsafe.
micxz
I would create a file called "vhost.conf" and place it in the conf/ directory of the domain in qeustion:


AddHandler cgi-script .cgi


then restart apache, this way you won't open cgi's all the server world wide!!!!! could be a security risk!
Jonathan
Plesk uses suexec so running cgi scripts from the httpdocs directory as well is no more a security risk than just allowing your clients to run cgi scripts from their cgi-bin directory.
micxz
Your completely right jon, but this is better, than
"AddHandler cgi-script .cgi"
in the main httpd.conf wouldn't you say. At least this way youve narrowed it down to this one client, and you can monitor his perl scripting if you like.
Jonathan
Yeah good point icon_smile.gif

I'm sure we will all have to track down some poorly written script some day!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.