Although I can run test.cgi from the same location but app.cgi gives 开发者_如何学运维"Internal Server Error". I checked the permissions, chmoded 755 to everything.
The app is located in domains root so the url will be domain.com/app.cgi
This is the htaccess:
AddHandler cgi-script .cgi
Options +ExecCGI
IndexIgnore *
DirectoryIndex app.cgi
RewriteEngine on
RewriteRule ^$ app.cgi [L]
RewriteRule ^/$ app.cgi [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.cgi/$1
I'd really appreciate any help. Many Thanks!
Is there an error in your perl script? If your script doesn't compile you will get an Internal Server Error even if everything else is configured correctly.
Does your script print the headers (at a minimum, something like, Content-type: text/html\n\n
) before any other output?
Your server's error logs should contain some information either from the perl interpreter or from the web server about why a CGI script failed to run.
Keep the stackoverflow Perl-CGI troubleshooting guide handy:
How can I troubleshoot my Perl CGI script?
精彩评论