This article explains where CGI scripts should be placed on the follwoing platforms:
Any directory that is allowed to execute files can be used for storing CGI scritps. To set the Allow Execution flag, log into HostPilot Control Panel > Web/FTP Server > Web Server > Permissions, navigate to the directory, check the appropriate box, and save changes.
Note: Do not allow execution for directories where your downloadables are. This causes your *.exe files to be executed on the server (as CGI) instead of being downloaded. You need to have your ASP (CGI) scripts and downloadable *.exe files in the separate directories with different Directory Access settings.
CGI executables are depreciated on Windows 2008 server.
You should upload CGI scripts to cgi-bin folder that is located under htdocs. Files that are located in cgi-bin folder are recognized by web-server as CGI programs and run from the shell. To make CGI scripts run at your account you should do the following:
- Set the path to interpreter at your script at the first line (i.e. #!/usr/bin/perl for Perl scripts).
- Upload your script to cgi-bin folder.
- Set execution mode to your script. (you can do this from Web/FTP Server > Apache Server > Permissions page of your HostPilot or via ftp by using "quote site chmod 755 filename" command).
- Run it via web browser (http://yourdomain/cgi-bin/filename). You will need to put a link to the script into a web page and, possibly, create form that will submit all necessary information to the script.