Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
letsencrypt certbot-auto
vim `/etc/nginx/sites-available/default`
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
server_name erlang.us;
location / {
try_files $uri $uri/ =404;
}
}
server {
listen 80;
server_name wx.roccoliu.com;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}
Owner

dongyuwei commented Jul 17, 2017

after run ./certbot-auto --nginx -d erlang.us -d wx.roccoliu.com -n --agree-tos --email me@gmail.com

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

        root /usr/share/nginx/html;
        index index.html index.htm;

        server_name erlang.us;

        location / {
                try_files $uri $uri/ =404;
        }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/erlang.us/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/erlang.us/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
}

server {
        listen 80;
        server_name wx.roccoliu.com;

        root /usr/share/nginx/html;
        index index.html index.htm;
        location / {
                try_files $uri $uri/ =404;
        }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/erlang.us/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/erlang.us/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
}
Owner

dongyuwei commented Jul 17, 2017

git clone git@github.com:certbot/certbot.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment