cPanel autossl with mod_rewrite rules and site verification

Posted at October 10, 2016 at 3:49 pm by John Quaglieri

cPanel autossl is a free service for cpanel/WHM to give free SSL certificates for domains with an active cpanel license. Like letsencrypt a 90 day certificate is given and ssl certificates are issued when certain requirements are met. Many server administrators have been pushing cpanel for LetsEcrypt to be fully supported but that continues to be pushed back. Comodo though is a good temporary solution however.

Comodo must verify domain ownership using a text file before giving an ssl certificate. Some websites have rewrite rules that will break autossl in cpanel due to rewrite rules.

You may see an ssl in logs such as:

2:19:31 PM WARN The domain “InterServer.net” has failed domain control validation (The system failed to fetch the DCV file at “http://InterServer.ne/483085.BIN_AUTOSSL_CHECK_PL__.NXFwhqwJq4_GD229.tmp” because of an error: The system failed to send an HTTP “GET” request to “http://InterServer.ne/483085.BIN_AUTOSSL_CHECK_PL__.NXFwhqwJq4_GD229.tmp” 

One fix is under RewriteEngine on exclude txt/tmp files

RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(txt|tmp)$

The verification will go through now and the certificate will be issued.

3.50 avg. rating (72% score) - 2 votes

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply