How To Display All Virtual Hosts Defined for Apache 2

Author: , January 29th, 2024

How To Fix WordPress Gateway Timeout Errors Running Apache with PHP-FPM

Author: , April 11th, 2023

PROBLEM: I was seeing the following error when trying to do a plugin update, and an error in my WordPress logs: Update failed: 504 Gateway Timeout Gateway Timeout The gateway did not receive a timely response from the upstream server or application. [Tue Apr 11 22:12:01.373709 2023] [proxy_fcgi:error] [pid 26878] (70007)The timeout specified has expired: […]

How To Redirect to https in Apache Using mod_rewrite

Author: , November 17th, 2017

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)


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/

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 Change the umask for Apache on AWS Linux

Author: , September 22nd, 2016

echo “umask 002” >> /etc/sysconfig/httpd service httpd restart

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.

How To Fix Apache VirtualHost Overlap on Port 443 on AWS Linux

Author: , July 4th, 2016

If you get this error when starting Apache or via apachectl configtest: [warn] _default_ VirtualHost overlap on port 443, the first has precedence then you must add: NameVirtualHost *:443 to /etc/httpd/conf/httpd.conf, then restart Apache

How To Use wget with Basic Auth

Author: , June 9th, 2016

If you need to use wget to obtain the contents of a web page, but that page has either Basic or Digest Authentication enabled, use the following syntax to gain access: wget –http-user=yourUserNameHere –http-password=yourSecretPasswordHere ~or~ wget

How To Enable Compression On Apache Webservers

Author: , April 26th, 2016

Add the following to either .htaccess or httpd.conf: