Report this

What is the reason for this report?

Let's Encrypt Not Working (Grav, NGINX, Ubuntu 16.04.2)

Posted on July 12, 2017

Hi,

I’m having an issue getting Let’s Encrypt to work on my current droplet (Nginx on Ubuntu 16.04.2 with the Grav CMS). I’ve followed the tutorial (https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04) and once I figured out that installing Grav had moved the root, I experienced no errors.

The problem is, it just isn’t working. My site still returns http and errors at https. Is there something I’m missing? My /etc/nginx/sites-available/default file is pasted below. Could Grav be overwriting something?

Any help appreciated.

Thanks,

Ben

server { listen 80; listen [::]:80; server_name ben-johnston.co.uk www.ben-johnston.co.uk; return 301 https://www.ben-johnston.co.uk$request_uri; }

server{ # SSL configuration # listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; include snippets/ssl-www.ben-johnston.co.uk.conf; include snippets/ssl-params.conf; # # Note: You should disable gzip for SSL traffic. # See: https://bugs.debian.org/773332 # # Read up on ssl_ciphers to ensure a secure configuration. # See: https://bugs.debian.org/765782 # # Self signed certs generated by the ssl-cert package # Don’t use them in a production server! # # include snippets/snakeoil.conf; server_name www.ben-johnston.co.uk;

    root /home/grav/www/html;


    location ~ /.well-known {
            allow all;
    }

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    server_name www.ben-johnston.co.uk;

    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ =404;

    }

} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ .php$ { # include snippets/fastcgi-php.conf; # # # With php7.0-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php7.0-fpm: # fastcgi_pass unix:/run/php/php7.0-fpm.sock; #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #       deny all;
    #}

}

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.