Monday, 24 August 2009

How to run CGI scripts anywhere in the server, Plesk.

# cd /etc/httpd/conf/


# cp -p httpd.conf httpd.conf.bak


# vi httpd.conf


uncomment AddHandler cgi-script .cgi


# service httpd restart



or
Create an .htaccess file in your cgi-bin directory, that file should have the following

AddType text/x-server-parsed-html .html
AddType application/x-httpd-cgi .cgi .p
l

Make sure you upload it in ASCII format, not binary.


set the permissions on your scripts correctly


# chmod   755   XXXX

No comments:

Post a Comment