What is this second number after HTTP status code? - http

I did grep " 500 " on the request log and got this, I understand that HTTP code is 200 but what is this 501?
POST /api/v1/url HTTP/1.1" 200 501

I suppose your server is Apache and logs are in CLF (Common Log Format).
Then 501 is the size of the server response (in bytes and in total).

Related

What does the nginx 502 559 error code mean?

I'm getting a "502 559" error in my nginx error logs. I know that the 502 means "bad gateway". What does the 559 mean?
As mentioned by Richard Smith in the comment, 559 in the nginx log stands for:
the number of bytes in the HTML response that Nginx sent to the browser
Source:
http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format
or, as specified in the docs:
$body_bytes_sent
number of bytes sent to a client, not counting the response header; this variable is compatible with the “%B” parameter of the mod_log_config Apache module

Nginx: rewrite http status message in the header (not body)

In Nginx, I want to customize the status code message right after the status code:
such as this is the default:
HTTP/1.1 429
and I want to do this:
HTTP/1.1 429 Too many requests
How can I get it done please? Note this is the header not the body at all.

Nagios returning OK with check_http and status 303

Probably an easy question but search is not helping.
# ../libexec/check_http -H google.co.uk
Provides:
HTTP OK: HTTP/1.1 301 Moved Permanently - 592 bytes in 0.153 second response time|time=0.152933s;;;0.000000 size=592B;;;0
But
# ../libexec/check_http -H google.co.uk.thisisnotarealurl
Provides:
HTTP OK: HTTP/1.0 303 See Other - 212 bytes in 0.161 second response time|time=0.161133s;;;0.000000 size=212B;;;0
How can it be showing HTTP OK when the site doesn't exist?
Nagios is showing the site is OK whether it exists or not, is this normal?
Status 303 means the site is present, just somewhere else. Same for 301 (with different semantics). Thats not a Failure so yeah thats normal.
The question is why you get 303 for google.co.uk.thisisnotarealurl. Maybe some setup in your network (DNS proxy that always delivers some result? See also the comment of James_pic!)
What do you get if you hit that into a browser (from the same machine & setup of Nagios)

Nginx giving 400 error:

I am using Nginx to handle hits of API. I checked the access log and found that sometimes Nginx is giving 400 error.
GET /url to hit/ HTTP/1.1" **400 172** "-" "-"
What is 172 in above log ? and how to solve this error in Nginx ?
172 corresponds to the size of server response in bytes.
Source: https://easyengine.io/tutorials/nginx/log-parsing/

How to interpret access log of Apache server?

I checked this link but could understand as they have provided with a different format.
This is an entry in my access log.
127.0.0.1 - - [13/Aug/2012:13:39:53 +0530] "GET /cgi-bin/test.cgi HTTP/1.1" 200 48
I want to know the meaning of the last code.
I know that 200 id OK status code but what is 48 or any other number.... ?
Please help!
i think it means the size in bytes ..
Regards
mimiz

Resources