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: grep -Rn mod_status /etc/httpd/* 1 /etc/httpd/conf.modules.d/00-base.conf:58:LoadModule status_module modules/ /etc/httpd/conf.modules.d/00-base.conf:58:LoadModule status_module modules/ Add support for the call just under the first DocumentRoot statement: vim /etc/httpd/conf/httpd.conf 1 2 3 4 5 6 <Location /server-status>     SetHandler server-status     Require ip […]

How To Restart Apache Using cron If the Load Gets Too High

Author: , February 3rd, 2016

There are times when the hackers slam my servers and the load gets too high. I use a very simple bash script as a cron job to monitor the load and take action when it gets too high. The script will stop httpd, sleep for a configurable period of time (currently 3 minutes), then start […]

How To Auto-Restart Apache If the Load Gets Too High

Author: , September 15th, 2015

The script to check and restart apache…works on CentOS – YMMV! 1 2 3 4 5 6 7 8 9 10 11 #!/bin/bash MAXLOAD=6 check=$(uptime | awk -F’average: ‘ ‘{print $2}’ | awk ‘{print $1}’ | tr -d ‘,’) if [[ $check > $MAXLOAD ]]; then     /sbin/service httpd stop     HOST=`hostname`   […]

How To Force Apache To Use https

Author: , October 26th, 2011

1 2 3 RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

How to Monitor Virtual Web Hosts with Nagios

Author: , October 30th, 2009

The Nagios configuration files are located (for me) in /opt/local/etc/nagios/objects. First, create a new command in commands.cfg file: -u URL to test -s String to expect in the content Then, add a new service to the services.cfg file:


Author: , October 16th, 2009

Got the client’s web server to accept secure connections via SSL. I configured Apache httpd.conf properly so it used the right certificate file and it finally started working. I love lsof – what a great tool. Naomi just got home. Time for some TLC for her.

Looking for Authority…

Author: , October 16th, 2009

Need to find the client’s SSL cert – anyone seen it?

Another Day, More Stress

Author: , October 5th, 2009

Just want to be able to get back to work on the secret client’s stuff. Like now. But I can’t because our neighbor is stopping by with traps for the cats. So I have to deal with THAT now, instead of getting focussed time. Is driving me crazy. The data recovery has NOT been going […]

Apache httpd.conf Directory Wildcard Matching

Author: , September 27th, 2009

<Directory> and </Directory> are used to enclose a group of directives that will apply only to the named directory and sub-directories of that directory. Any directive that is allowed in a directory context may be used. Directory-path is either the full path to a directory, or a wild-card string using Unix shell-style matching. In a wild-card string, ? […]