Back from vacation - allow me to start from the beginning
Environment :
External domain = example.com. Hosted externally
Internal domain = example.com. Hosted internally
Caveat : I am NOT the network admin - I must work with what I am given. And my esteemed colleagues do not know how to push CAs & do not want to research
What I want : Attach ssl certs to internal (non-Internet facing) apache web servers;
foo.local.example.com, bar.local.example.com
What I did :
- Had our AD admins create local.example.com on our internal domain
- Built the web server encrypt.local.example.com
- Built a virtual host www.local.houwire.com on the encrypt server
- Asked our external DNS provider to NAT the internal IP so as to make it accessible to Let’s Encrypt
What I’ve got : Let’s Encrypt ‘successfully enabled https://local.example.com’
ssllabs.com Report : local.example.com Certificate name mismatch
MORE :
(PuppetMaster
cd /etc/puppet/modules/common/templates
vi httpd_conf.erb
IncludeOptional conf.d/.conf
<% if @hostname == ‘encrypt’ then -%>
IncludeOptional sites-enabled/.conf
<% end -%>
vi hosts.erb
10.1.1.200 encrypt.local.example.com encrypt
<% if @hostname == ‘encrypt’ then -%>
10.1.1.200 www.local.example.com www
<% end -%>
LETS ENCRYPT
Pre-requisites
Our public DNS server must allow traffic to the encrypt server over port 80 & 443; which means it needs a public IP
Install
/bin/yum -y install mod_ssl python-certbot-apache
Virtual Host
/bin/mkdir -p /var/www/local.example.com/public_html
/bin/chown -R $USER:$USER /var/www/local.example.com/public_html
/bin/cat > /var/www/local.example.com/public_html/index.html <<!
...
...
!
sites subdirectories not necessary, but …
/bin/mkdir -p /etc/httpd/sites-available
/bin/mkdir -p /etc/httpd/sites-enabled
/bin/cat > /etc/httpd/sites-available/local.example.com.conf <<!
<VirtualHost *:80>
ServerName www.local.example.com
DocumentRoot /var/www/local.example.com/public_html
!
ln -s /etc/httpd/sites-available/local.example.com.conf /etc/httpd/sites-enabled/local.example.com.conf
Registration
sudo certbot --apache -d local.example.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for local.example.com
Waiting for verification…
Cleaning up challenges
Created an SSL vhost at /etc/httpd/sites-available/local.example.com-le-ssl.conf
Deploying Certificate for local.example.com to VirtualHost /etc/httpd/sites-available/local.example.com-le-ssl.conf
Enabling site /etc/httpd/sites-available/local.example.com-le-ssl.conf by adding Include to root configuration
Congratulations! You have successfully enabled https://local.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=local.example.com