Apache httpd throw HTTP 500 error with Premature end of script headers logged in error_log
Issue
- While accessing the cgi scripts, Apache httpd shows HTTP 500 error in web browser, at the same time Apache httpd access_log and error_log shows below messages.
access_log:
"GET /cgi-bin/test.pl?user=admin HTTP/1.1" 500"
error_log:
(8)Exec format error: exec of '/var/www/cgi-bin/test.pl' failed
Premature end of script headers: test.pl
Environment
- Red Hat Enterprise Linux (RHEL)
- 6.7
- Apache httpd
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
