HTTPS Check returning 500 instead of 200

Hello,

I’m currently trying to monitor one of our websites…

Monitoring the root site (https://mysite.mydomain.tld) is working as expected but monitoring a subfolder (https://mysite.mydomain.tld/mysubfolder) isn’t working. I always get a 500 as return code. The website is working and gives a 200 return code if I use the browser to access it. This subfolder has also no redirection or anything like that. It is also working if I use wget from commandline.

Any ideas?

Regards
CheckMan

Hard to tell without knowing how your rule is set up.
How do you check the subfolder?

Do you use the field URI to fetch (correct)

image

or enter the subfolder’s name in the field host name (wrong)?

image

Sorry for that!

I entered it in the URI to fetch field.
(I already have a bunch of other websites with subfolders too. They’re working.)

Can you look into the apache (or whatever webserver you use) logs of the target site?

Thats a problem. It is a Microsoft IIS :smiley:
As far as I know logging is disabled at default settings… and you can’t just enable it with a click or config option :frowning:

I only see this in the logfile:
2020-10-26 13:15:10 WEBSERVERIP GET /mysubfolder - 443 - MONITORINGSERVERIP check_http/v2.2+(monitoring-plugins+2.2) - 500 19 13 15 MONITORINGSERVERIP:42722

Internal Server Error from your IIS. Is it possible that this is an application running on your IIS that is providing this URI?

Sorry I don’t get it…
Yes this is an application running on the IIS.
Surfing to it via browser is working.

Your server throws an 500 internal server error if you only request the mentioned URI.
I think that you need to submit a little bit more. For instance some header information or something else.
If you open the URL inside your browser then you can activate the dev tools and you can inspect the complete communication between your server and your browser.
There you will see that more happens than only retrieving one directory.

2 Likes

Thanks for your hint!

After looking into the communication I saw that the server expects a HTTP/1.1 request instead of HTTP/1.0.

Solution was to use the Virtual host instead of the Hosts name / IP address field.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.