1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| $ acme.sh --issue -w /usr/share/nginx/html -d xxx.xxx -d xxx.xxx.xxx
$ mkdir /etc/nginx/ssl $ acme.sh --install-cert -d xxx.xxx \ --cert-file /etc/nginx/ssl/xxx.xxx.cer \ --key-file /etc/nginx/ssl/xxx.xxx.key \ --fullchain-file /etc/nginx/ssl/fullchain.cer \ --ca-file /etc/nginx/ssl/ca.cer \ --reloadcmd "systemctl restart nginx"
$ vi /etc/nginx/nginx.conf server { listen 80; listen [::]:80; server_name xxx.xxx www.xxx.xxx;
location / { rewrite ^/(.*)$ https://$host/$1 permanent; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name xxx.xxx www.xxx.xxx; root /usr/share/nginx/html;
ssl_certificate /etc/nginx/ssl/xxx.xxx.cer; ssl_certificate_key /etc/nginx/ssl/xxx.xxx.key; ssl_trusted_certificate /etc/nginx/ssl/ca.cer; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; }
$ acme.sh --info -d xxx.xxx
|