How to enable Apache Status Page

how-to-enable-apache-status-pageIn this post we show you how to enable apache status page, in Apache 2.2 and Apache 2.4.

The status page show extra information about your web server, is very very important for a sysadmin can check status of web server all time, the information that we see is about: process, request, memory ram in use, cpu in use and so on.

 

 

This tutorial only applies to versions of Ubuntu and derivatives.

The first thing that we will need is to put to enable the module “status” into Apache, how? with the next command:

Enable module status with the next command (line 1) and after restart apache:

Then after that, we need add some configuration to apache2.conf file, but before we need know what version of Apache we have installed, could use the next command:

Now you can continue depending on their version.

For Apache 2.2:

Use the following configuration, you can add at the end of the file apache.conf

For this example you have to replace x.x.x.x for your current IP, if you are in a local area her IP could start with 192.168.1.x, but if you try to access to remote server you need to know your public IP, you could check that in http://whatismyipaddress.com/ and then replace x.x.x.x for your public IP.

After that we need restart Apache service:

For Apache 2.4

Use the following configuration, you can add at the end of the file apache.conf

After that we need restart Apache service:

In this case domain name is required, if you don’t have access a domain you can add some line to the file /etc/hosts in the  server, for example:

This is my hosts file, I only added line 4 for this case:

Now open a browser a write: http://(your Apache server IP)/server-status, and you should see Apache status page.

we also prepare a video based in this tutorial:

 

That’s all for now I hope this tutorial has been helpful.