https-check

A script which checks if the apache is alive, and responding to ssl. Obviously you need to fill in the stuff in .

#!/bin/bash
# Necessary paths
export PATH_TO=/opt/webspace/htdocs
export LD_LIBRARY_PATH=/opt/apache/libexec:/usr/local/lib

# Check .htaccess to verify correct syntax
/opt/apache/bin/httpd -t -f $PATH_TO/.htaccess

# SSL Check
host=$1
test -z “$host” && host=””
openssl s_client -connect $host:443 -state -debug

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s