Run CGI scripts anywhere in the server + Plesk

Server wide :

cd /etc/httpd/conf/

cp -p httpd.conf httpd.conf.bak

vi httpd.conf

uncomment AddHandler cgi-script .cgi

service httpd restart

or
1. 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 .pl

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

2 set the permissions on your scripts correctly.. usually to 755

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s