1 2 3 4 5 6 7 8 9 10 11 12 13 |
openssl genrsa 2048 > server.key openssl req -new -key server.key > server.csr openssl x509 -days 3650 -req -signkey server.key < server.csr > server.crt [root@ip-192-168-0-99 ~]# tail /etc/nginx/nginx.conf | tail -20 server { listen 443 default ssl; ssl on; ssl_certificate "/etc/nginx/conf.d/server.crt"; ssl_certificate_key "/etc/nginx/conf.d/server.key"; } } |