Get the files

You can download a zip file and extract it

OR

if you use a version control client you can checkout the sources of the project. It will make it easier to keep the files up to date.


Git clone

Checkout sources with git client.
The following commands create a directory pimped-apache-status below webroot and put all files there:

cd [webroot-directory]/[install-dir]/
git clone https://github.com/axelhahn/pimped-apache-status.git [optional-name-of-subdir]

Leaving [optional-name-of-subdir] empty will create a subdir named "pimped-apache-status"

Download


Get the latest version:
Download

Pimped Apache Server Status

Extract the files somewhere below webroot on your webserver. You can put to any subdirectory. It is not a must to have it in the webroot.


Permissions

File Permissions

  • all files must be readable by your apache user (apache or www-data)
  • all files in the application folder should be writable for the apache user. Then you can update the software with your webbrowser.
    minimal (for automatic installations with puppet or chef): these subdirectories must be writable for the apache user:
    • ./config/ - contains json files with the config
    • ./tmp/ - save data for download updates and version check. In the config you can define a directory outside webroot too
    • ./vendor/ - to store external external libraries i.e. jquery, AdminLTE, ...

On monitored systems

You need the module mod_status and the setting ExtendedStatus On.
Allow your server to access the server-status page on the systems you want to monitor.
Don't forget to reload or restart httpd after changing its config.

                (...)
                LoadModule status_module modules/mod_status.so
                (...)
                ExtendedStatus On
                (...)
                <Location /server-status> 
                        SetHandler server-status 
                        Require ip 127.0.0.1
                        Require ip 192.168.123.4 # enter ip of your monitoring system
                </Location>

Advanced redirect
If you have a redirect to a controller file, then you need exclude the server status.

                <Directory /var/www/[hostname]/public_html/ >
                        RewriteEngine On
                        RewriteCond %{REQUEST_FILENAME} !-f
                        RewriteCond %{REQUEST_URI} !^/server-status$
                        RewriteRule ^(.*)$ app.php [QSA,L]
                </Directory>

First run


Ensure that you checked the reqirements; see Home.

Then open

http://[your-server]/[install-dir-of-apachestatus]/

in your webbrowser, i.e. http://localhost/apachestatus/.
The first request creates a default config. You get a success message.

message create user config

You got an error message?

2 things maybe could fail at the beginning.


missing php-curl

You get a text message in the browser:

ERROR: PHP-CURL is not installed. It is required to run.
see documentation get started.

... you need to install the php curl module; i.e.

$ sudo apt-get install php-curl

... or maybe needs to be enabled in the php.ini

extension=php_curl.dll



missing write permissions on config directory

You get a text message in the browser:

ERROR: Creation of config/config_user.php failed. Check the permissions on config directory (it must be writable for apache user).

... I guess you installed it as root. Change the owner of the config directory to the apache user (www-data or wwwrun).

$ cd [webroot-directory]/[install-dir-of-apachestatus]/
$ chown www-data:www-data config

Setup user and password


You get the possibility to setup a user and password to protect the tool.

Remark: you also can setup no user and password - but in a productive environment you should protect the access by httpd config (set an IP restriction or custom authentication).

setup user and password

Setup servers to monitor


Go to the configuration menu for servers.
Click to [Add server] to add a new server in the group "default".

See Customization -> Setup -> Setup servers for more details.

setup new server group and servers inside groups

Video: Installation on Lubuntu







Copyright © 2011-2018 Axel Hahn
project page: GitHub (en)
Axels Webseite (de)
Share on Facebook | Google +
results will be here