cgi under public_html dir

I would like to know how to enable cgi for a dir under public_html dir in a server

Status: 
Active

Comments

bislinks's picture
Submitted by bislinks on Fri, 11/20/2009 - 20:41 Pro Licensee

or even for a file ending in .pl or .cgi under public_html dir

The simplest way to do this is :

1) Select the domain from the left menu

2) Go to Services -> Configure Website

3) Click on /home/domain/public_html , then on Document Options

4) Change "Execute CGI programs" to "Yes"

5) Click "Save", then "Apply Changes"

bislinks's picture
Submitted by bislinks on Sat, 11/21/2009 - 11:05 Pro Licensee

This is the error i got for service httpd restart Stopping httpd: [ OK ] Starting httpd: [Sat Nov 21 10:02:45 2009] [warn] Useless use of AllowOverride in line 1369. [ OK ]

is it related or have anything to do with it

Oops, looks like I forgot a step.

On the page for the public_html directory, click on "MIME Types" and in the "Content handlers" table select "cgi-script" was the handler, and enter .cgi as the extension. Then in the next field, select "cgi-script" again, and enter .pl as the extension.

Then click "Save", and "Apply Changes"