Shyne
04-05-2002, 03:32 AM
Is there a way to configure apache under plesk to run CGI files outside the cgi-bin directory?
I added a ScriptAlias, but that didn't work.
I added a ScriptAlias, but that didn't work.
![]() | View Full Version : plesk and cgi-bin Shyne 04-05-2002, 03:32 AM Is there a way to configure apache under plesk to run CGI files outside the cgi-bin directory? I added a ScriptAlias, but that didn't work. kunal 04-05-2002, 04:10 AM Just uncomment the following lines in your httpd.conf file : AddHandler cgi-script .cgi AddHandler cgi-script .pl That should do it. :) MotleyFool 04-05-2002, 06:28 AM Or if you have AllowOverride enabled you can add Options +ExecCGI in the .htaccess file in that directory But is it not risky to allow CGI script execution everywhere? Cheers Balaji AcuNett 04-05-2002, 09:37 AM There are instructions in PLESK.com FAQs. webx 04-05-2002, 02:43 PM Originally posted by MotleyFool But is it not risky to allow CGI script execution everywhere? I don't think so. If they can run from a particular directory like cgi-bin and do no harm, then why not some other directory? The cgi-bin used to be the old style of allowing only one directory. Though it helped keep all the scripts in one directory :) Shyne 04-05-2002, 06:31 PM I tried the AllowOverride options being enabled and putting in Options +ExecCGI in the .htaccess file, but that didn't work. AddHandler cgi-script .cgi AddHandler cgi-script .pl Above Addhandlers were enabled. Maybe the problem is that I'm trying to call it for a web_user. ww.domain.com/~webuser/cgi-bin/ Does it not work with web users? It works with in any directory as long as I don't call it as a web_user. webx 04-05-2002, 06:41 PM Here's the relevant portion in httpd.conf for ~users: # # UserDir: The name of the directory which is appended onto a user's home # directory if a ~user request is received. # <IfModule mod_userdir.c> UserDir public_html </IfModule> # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # #<Directory /home/*/public_html> # AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # <Limit GET POST OPTIONS PROPFIND> # Order allow,deny # Allow from all # </Limit> # <LimitExcept GET POST OPTIONS PROPFIND> # Order deny,allow # Deny from all # </LimitExcept> #</Directory> Noldar 04-05-2002, 06:47 PM You need to have 'Allow scripting for web users' enabled. You'll find it under preferences for the domain. Richard Shyne 04-05-2002, 08:49 PM I added: <IfModule mod_userdir.c> UserDir public_html </IfModule> But it still loads the files from the same directory. Also 'Allow scripting for web users' is enabled. It still giving me 500 error. |