Tuesday, January 6, 2015

Apache webserver (HTTP status) codes

HTTP status codes are important at the time of analysing logs. So we need to
learn at least basic and very important status codes here:

1) 1xx   --- This status code gives basic information like Request received and process continuing like that.
                

2) 2xx  ---- This is belongs to successful response for your request from webservers/app servers.

3) 3xx  ---- This status code means it may not get reply from server, but it get response from local     cache. Some times few of the requests-responses we may not get response from servers (in your local browser may hold some cache on that requests), in this case also we need to verify,is reponse or reply properly we are getting or not(some time we may get old data ).


4) 4xx --- This status code is error related. For this type of status codes we need to verify which
               errors we are getting from the logs.

400  ---  Bad Request
           The server cannot  process the request due to something that is perceived to be a client error .

401 --- Unauthorised
        When authentication is required and has failed or has not yet been provided.

403 -- Forbidden
    The request was a valid request, but the server is refusing to respond to it. Difference between 403 and 401 is, 401 is unauthorised access means don't have user permission, 403 is you may have user access but still you don't have access to the data.(some time data permissions).


404 -- File not found
   The requested resource could not be found.

5xx -- Internal server error
The server failed to fulfill an apparently valid request. This time we need to check server side configurations or need to restart server once.

You will get lot more status codes on internet. But this is very useful and essential codes for our
daily use.