How To Redirect to https in Apache Using mod_rewrite

Author: , November 17th, 2017

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 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/mod_status.so /etc/httpd/conf.modules.d/00-base.conf:58:LoadModule status_module modules/mod_status.so 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 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 1 2 3 4 … [[webroot_map]] yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress www.yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress … [[webroot_map]] yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress www.yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress Second, use the new macro language feature in Apache 2.4 […]

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 Fix Peer Not Authenticated Errors While Using AWS API Tools

Author: , February 9th, 2016

I was getting the following errors when using an older version of the Amazon EC2 API Tools: $ ec2-describe-regions Unknown problem connecting to host: ‘https://ec2.amazonaws.com’ Unable to execute HTTP request: peer not authenticated The solution was to upgrade to the latest AWS CLI tools and start using the aws command instead. For example: aws ec2 […]

How To Fix iOS 7.1 Error: Cannot install applications because the certificate is not valid

Author: , March 19th, 2014

After I upgraded to iOS 7.1, Enterprise application deployments no longer worked. I would get the following error: “Cannot install applications because the certificate is not valid”, and the download would fail. As it turns out, Apple changed the rules without notification again, and is now requiring https for part of the process. For those […]

How To Determine HTTP Protocol Using PHP

Author: , May 11th, 2012

$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== ‘off’) ? “https:” : “http:”;

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 Determine The Current Protocol Using Javascript

Author: , February 18th, 2011

var myPrefix = ‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’;

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.