Apache HTTPD throw HTTP 500 error with premature end of script headers in logs
Issue
-
While accessing the CGI scripts, Apache HTTPD shows HTTP 500 error in web browser. At the same time, HTTPD
access_loganderror_logshows 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, tools, and much more.