How To Display All Virtual Hosts Defined for Apache 2

Author: , January 29th, 2024

How To Watch https Calls to Apache 2.4 using Perl and mod_status

Author: , September 5th, 2017

Step 1: Enable Apache status and lock it down: Make sure mod_status is being loaded:

Add support for the call just under the first DocumentRoot statement:

Step 2. Prepare your environment:

Step 3: Create and run the status script: (See the astat contents at the bottom)

/root/astat

How To Configure Apache 2.4 to Renew LetsEncrypt running WordPress and https

Author: , August 21st, 2017

This post does not cover configuring letsencrypt or ssl/https. First, make sure your LetsEncrypt configuration points to the actual WordPress document root directory cat /etc/letsencrypt/renewal/www.yourdomain.com.conf

Second, use the new macro language feature in Apache 2.4 to configure an https redirect macro which does NOT redirect to https for anything in the .well-known subdirectory. This […]

How To Protect a WordPress Site Using Basic Auth in Apache 2.4

Author: , August 25th, 2016

Apache 2.4 changed the security configuration directives a bit. Here is an example using basic auth:

What tripped me up for a while was that I still had the Require all granted directive inside the container, and that needed to be removed for the auth to work.