Apachectl is a front-end control interface for Apache HyperText Transfer Protocol (HTTP) server. It is designed to assist the administrators to control the functioning of the Apache daemon. This method requires the modstatus module to be installed and enabled in the server to make it function as required. The Apache status module, commonly known as modstatus or server-status, provides information about the requests Apache is serving and has recently served. This information includes. The number of workers serving requests; the number of idle workers' the status of each worker, the number of requests that worker has performed, and the total.
1. Overview

In this very quick tutorial, I will show how to get and validate the StatusCode of the HTTP Response using HttpClient 4.
If you want to dig deeper and learn other cool things you can do with the HttpClient – head on over to the main HttpClient tutorial.
2. Retrieve the Status Code from the Http Response
After sending the Http request – we get back an instance of org.apache.http.HttpResponse – which allows us to access the status line of the response, and implicitly the Status Code:
Apache Mod Status
Using this, we can validate that the code we receive from the server is indeed correct:
Notice that we're using the predefined Status Codes also available in the library via org.apache.http.HttpStatus.

3. Conclusion
This very simple example shows how to retrieve and work with Status Codes with the Apache HttpClient 4.
The implementation of all these examples and code snippets can be found in my github project – this is an Eclipse based project, so it should be easy to import and run as it is.
Get started with Spring 5 and Spring Boot 2, through the Learn Spring course:
>> CHECK OUT THE COURSEScript types:portrule
Categories: discovery, safe
Download: https://svn.nmap.org/nmap/scripts/http-apache-server-status.nse
User Summary
Attempts to retrieve the server-status page for Apache webservers thathave mod_status enabled. If the server-status page exists and appears tobe from mod_status the script will parse useful information such as thesystem uptime, Apache version and recent HTTP requests.
References:
Script Arguments
slaxml.debug
See the documentation for the slaxml library.http.host, http.max-body-size, http.max-cache-size, http.max-pipeline, http.pipeline, http.truncated-ok, http.useragent

smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusername
See the documentation for the smbauth library.Example Usage
Apache Http Status 408
Script Output
Httpd Status
Requires
Author:
Apache Http Status Java
License: Same as Nmap--See https://nmap.org/book/man-legal.html

Comments are closed.