Let's Encrypt issues with Ubuntu 16.04 LAMP + Wordpress one-click

October 13, 2016 93 views
Apache LAMP Stack Let's Encrypt WordPress IPv6 DigitalOcean Ubuntu 16.04

I've been pulling my hair out this week setting up my VPS on DigitalOcean..I've literally destroyed and restarted my droplet a dozen times trying to go through the motions and figure out what is missing. There is something a bit off with the letsencrypt script that is packaged with DO's LAMP+WP stack for Ubuntu 16.04. Either that or there are steps missing in the various tutorials.

What I've done so far: Started out using the 1-click install for LAMP+WP, where everything goes swimmingly at first. I've gone through this process, as well as setting my LAMP server up from the ground up multiple times. Every single time I've gone from configuring Ubuntu/Apache/MySQL/Php7.0 as a sudo user, settiing permissions, using SSH key access, setting up VHosts, and setup to the point of the WP-admin install process and everything is perfect there...
Now, the problem surfaces every time I run the letsencrypt client. The site is live after I do the one-click WP install. Then, after running the script and following the tutorial on securing Apache with Let's Encrypt I reach a server ID page that says unavailable on port 443. So, I changed my VHosts file from *:80 to *:443. After the change, the wordpress site is back up, but it seems to not be forcing HTTPS. I can open I've also tested my SSL and end up with A rating every time.

I could be missing something along the way, configuring my VirtualHost files improperly..Not really sure. I've gone through every tutorial on DO 10 times over to see if I'm missing something.
Here is my VirtualHost file:

<VirtualHost *:443>  
    ServerAdmin asdf@gmail.com  
    ServerName asdf.com  
    ServerAlias www.asdf.com  
    DocumentRoot /var/www/asdf.com/public_html  

    <Directory /var/www/html/>  
        Options Indexes FollowSymLinks  
        AllowOverride All  
        Require all granted  

    ErrorLog ${APACHE_LOG_DIR}/error.log  
    CustomLog ${APACHE_LOG_DIR}/access.log combined  
RewriteEngine on  
RewriteCond %{SERVER_NAME} =asdf.com [OR]  
RewriteCond %{SERVER_NAME} =www.asdf.com  
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI}   [END,QSA,R=permanent]  

Let me know if you would like me to post anything else for you guys to help me figure this headache out.

1 Answer

Can you visit the site using https?

Dont forget to change the setting of your Wordpress installation. Go to Setting > General and then change the Wordpress Address and Site Address accordingly. For reference check the picture below.

  • No, that is currently the issue. It doesn't force https. I did previously adjust the wordpress URLs as well.

Have another answer? Share your knowledge.