TopicNavigationUser login |
CGI troubleshootingSetting up: Addhandler AddHandler cgi-script .cgi .pl Options +ExecCGI ScriptAlias (if needed) ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" ScriptAlias /cgi-bin/ /var/www/partytime.wackyfunster.com/html/cgi-bin/ CGI Troubleshooting If you get a 403 forbidden, this usually means that +ExecCGI is not enabled for the pertinent directory. Typically, when there are issues with CGI you'll get a 500 internal The most common issues are: Windows newlines (cat -A filename will show ^M$ and the end of the line) Script file is not executable. Lack of Content-Type header in the script (see example script below) (Plesk) Improper file ownerships resulting in suexec issues. fix: check /var/log/httpd/suexec.log, reset ownerships/permissions as indicated by the logs. To verify cgi is functioning properly, you can create a test script (see below), set the appropriate ownerships, chmod +x, and see if it works. Test script: #!/usr/bin/perl print "Content-type: text/html\n\n"; print "CGI works!\n"; |
Linux JournalSlashdot |