How to monitor apache web server load and Page statistics

    Posted in Linux Servers on Jul 13, 2019

    linux-vps-hosting.jpg

    Mod_status is an Apache module which helps to monitor web server load and current httpd connections with an HTML interface which can be accessible via a web browser.

    Enable mod_status in Apache

    vi /etc/httpd/conf/httpd.conf

    Search for the word “mod_status” or keep scrolling down until you find below line and remove # in order to enable mod_status.

    1.PNG

    Configure mod_status

    Search for the word "location" and put these lines in order to configure mod_status.

    2.PNG

    After this, define the same configuration for each virtual host file for any domain configured in apache. Like for example : www.example.com

    3.PNG

    >Enable ExtendedStatus

    In order to add more information to the statistics page like CPU usage, request per second, total traffic, etc - enable ExtentedStatus. Uncomment the line and set the status “On” for ExtendedStatus directive.

    # ExtendedStatus controls whether Apache will generate "full" status
    # information (ExtendedStatus On) or just basic information (ExtendedStatus
    # Off) when the "server-status" handler is called. The default is Off.
    #
    ExtendedStatus On
    Restart Apache
    httpd -t
    
    Syntax OK
    
    service httpd restart
    
    Stopping httpd:                                          [  OK  ]
    Starting httpd:                                          [  OK  ]
    > Access mod_status Page
    http://serveripaddress/server-status
    

    Services Cloudtechtiq offers: