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 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!

Add to cron * * * * * /root/restart_apache_if_load_hits_threshold.sh >> /var/log/restart_apache_if_load_hits_threshold.log 2>&1

How To Force Apache To Use https

Author: , October 26th, 2011

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: [code] # ‘check_http_url’ command definition define command{ command_name check_http_url command_line $USER1$/check_http -I $HOSTADDRESS$ -u $ARG1$ -s $ARG2$ } [/code] -u URL to test -s String to expect in the content Then, add a new service to the […]

Certifiable!

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, ? […]