Nginx SSL Installation and Configuration Example

Leo-G edited this page Jun 8, 2016 · 2 revisions

Add the below to /etc/nginx/sites-enabled/yourdomain.conf

    server {

        listen 443 ssl default_server;
        server_name  yourdomain.com  www.yourdomain.com test.yourdomain.com;

        ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

        location ^~ /.well-known/acme-challenge/ {


            allow all;
           }

    }

    server {
        listen 80;
        server_name yourdomain.com www.yourdomain.com;
        return 301 https://$host$request_uri;
    }

For the complete Tutorial see http://techarena51.com/index.php/installing-and-securing-nginx-websites-on-linux-with-a-free-ssl-certificate-from-lets-encrypt/

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.