2016年4月26日星期二

How to configure LetsEncrypt SSL cert on Nginx

Step 1、You need to compile Nginx from source code for support ssl:
              ./configure --with-http_ssl_module
Step 2、Get letsencrypt client: git clone https://github.com/letsencrypt/letsencrypt
Step 3、Run letsencrypt client to generate the cert(You need stop nginx service if you have already run a nginx server and specify the full root path of your website ):
              cd letsencrypt
              ./letsencrypt-auto certonly --standalone --email ***@email.com -d www.yourdomain.com --webroot=/www/web/
Step 4、Configure the nginx server
              listen    443 ssl;
              ssl_protocols TLSv1.2 TLSv1.1 TLSv1
              ssl_certificate /etc/letsencrypt/live/www.yourdomain.com/fullchain.pem;
              ssl_certificate_key /etc/letsencrypt/live/www.yourdomain.com/privkey.pem;

没有评论:

发表评论