• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

Apache for Newbie: Set up Apache with mod_status

December 17, 2023

Apache for Newbie: Set up Apache with mod_status

Apache is one of the most popular web servers in the world, known for its stability, flexibility, and performance. If you are new to Apache and want to learn how to set it up with mod_status, this article is for you. Mod_status is an Apache module that provides detailed information about the server’s performance and current connections. It can be a valuable tool for monitoring and troubleshooting your Apache server.

Step 1: Install Apache

The first step is to install Apache on your server. If you are using a VPS hosting service like Server.HK, you can easily install Apache using the control panel or command line. For example, on a Linux server, you can use the following command:

sudo apt-get install apache2

Once the installation is complete, you can start Apache using the following command:

sudo service apache2 start

Step 2: Enable mod_status

Mod_status is not enabled by default in Apache. To enable it, you need to modify the Apache configuration file. The location of the configuration file may vary depending on your operating system, but it is usually located at /etc/apache2/apache2.conf or /etc/httpd/httpd.conf.

Open the configuration file using a text editor and search for the following line:

#LoadModule status_module modules/mod_status.so

Remove the ‘#’ at the beginning of the line to uncomment it. Save the file and exit the text editor.

Step 3: Configure mod_status

After enabling mod_status, you need to configure it to specify which IP addresses are allowed to access the status page. Open the Apache configuration file again and add the following lines:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost
    Allow from 127.0.0.1
    Allow from ::1
</Location>

These lines allow access to the status page only from the localhost and loopback IP addresses. If you want to allow access from other IP addresses, you can add them to the ‘Allow’ directive.

Step 4: Restart Apache

After making the necessary changes to the Apache configuration file, you need to restart Apache for the changes to take effect. Use the following command:

sudo service apache2 restart

Step 5: Access the status page

Once Apache is restarted, you can access the status page by entering the following URL in your web browser:

http://localhost/server-status

If everything is set up correctly, you should see a page displaying detailed information about your Apache server, including the number of requests being processed, the number of idle workers, and the current connections.

Summary

In this article, we have learned how to set up Apache with mod_status. By following the steps outlined above, you can enable mod_status and access the status page to monitor your Apache server’s performance and connections. This can be a valuable tool for troubleshooting and optimizing your server. Remember to always secure the access to the status page by allowing only trusted IP addresses. Now that you have the knowledge, go ahead and explore the power of Apache with mod_status!

Recent Posts

  • CN2 GIA vs BGP vs CN2 GT: What’s the Real Difference for China Connectivity?
  • Top 5 Use Cases for a Hong Kong Dedicated Server in 2026
  • Hong Kong VPS vs Japan VPS: Head-to-Head for Asia-Pacific Deployments in 2026
  • Hong Kong VPS vs Singapore VPS: Which Is Better for Your Asia Business in 2026?
  • How to Migrate from CentOS 8 to AlmaLinux or Rocky Linux Safely

Recent Comments

No comments to show.

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot