Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-27-2014, 07:14 AM   #1
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
HTTP/1.0 500 Intenal Server Error

Hi all,

I'm setting up nagios and one of the standard checks for localhost is HTTP.

However this monitor goes into alert.
When I use check_http I get a 500 error.
Same if I use wget http://localhost
When I go from my browser to http://hostip I get an empty page (no error, however index.html content is not shown, neither in the page source). When I use http://hostip/index.html I do get the content.

IIRC the config of httpd.conf is close to default so I don't understand what is missing here.
The Directory is /var/www/html and this allows all.

DirectoryIndex is set as index.html and index.html is an empty page.

Same happens when using the IP on the host itself.

[root@server ~]# /usr/lib64/nagios/plugins/check_http -I localhost -f follow -v
GET / HTTP/1.0
User-Agent: check_http/v1.4.16 (nagios-plugins 1.4.16)
Connection: close

http://localhost:80/ is 211 characters
STATUS: HTTP/1.0 500 Internal Server Error
**** HEADER ****
Date: Tue, 27 May 2014 11:11:44 GMT
Server: Apache/2.2.15 (Red Hat)
X-Powered-By: PHP/5.3.3
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
**** CONTENT ****

HTTP CRITICAL: HTTP/1.0 500 Internal Server Error - 211 bytes in 0.001 second response time |time=0.001312s;;;0.000000 size=211B;;;0
317 <Directory "/var/www/html">
 319 #
 320 # Possible values for the Options directive are "None", "All",
 321 # or any combination of:
 322 #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
 323 #
 324 # Note that "MultiViews" must be named *explicitly* --- "Options All"
 325 # doesn't give it to you.
 326 #
 327 # The Options directive is both complicated and important.  Please see
 328 #
 329 # for more information.
 330 #
 331     Options Indexes FollowSymLinks
 333 #
 334 # AllowOverride controls what directives may be placed in .htaccess files.
 335 # It can be "All", "None", or any combination of the keywords:
 336 #   Options FileInfo AuthConfig Limit
 337 #
 338     AllowOverride None
 340 #
 341 # Controls who can get stuff from this server.
 342 #
 343     Order allow,deny
 344     Allow from all
 346 </Directory>
Could anyone shed a light on what's wrong here?
Old 05-27-2014, 07:55 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,084

Rep: Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655Reputation: 1655

Check the apache error_log to find the reason of the 500 error

Old 05-27-2014, 08:04 AM   #3
Registered: Aug 2006
Posts: 609

Original Poster
Rep: Reputation: 79
Originally Posted by bathory View Post

Check the apache error_log to find the reason of the 500 error

There was no error there. Only the 500 error itself:
"GET / HTTP/1.0" 500 - "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
There was both a index.html and an index.php in the top level directory of the webroot.

I know error 500 is normally an application error. So I looked into /var/log/php.log however it was empty (I configured it before to use that file).
In the end I looked into /var/log/messages and there I found an error produced by the index.php script. I moved it away and tadaaa: issue solved

Just a usual case of looking into something,eventually deciding to post about it and 2 minutes later find out what is wrong

Thanks anyway!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Apache:HTTP 500 error sunrised24 Linux - Server 1 02-17-2012 12:23 PM
http returns 500 Internal Server Error but not https ceci2 Linux - Server 6 06-23-2010 08:04 AM
monodoc-http gives a http 500 internal server error ernesto_cgf Linux - Software 0 05-10-2007 03:48 PM
HELP! CGI problem : HTTP 500 - Internal server error eech55 Programming 2 10-11-2004 11:27 AM
http status 500 error pattar Linux - Software 1 02-18-2003 03:01 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration