1. To apply for a certificate, click - ssl from the operation bar on the right side of the My Domain Name list
2、配置 nginx config -> /etc/nginx/sites-enabled/default
Add at the bottom: (mine is django+nginx, so use uwsgi to forward requests), then restart the nginx service service nginx restart
server { listen 443 ssl; server_name vip.dayu1.net; ssl_certificate cert/1525771112168.pem; ssl_certificate_key cert/1525771112168.key; server_tokens off; fastcgi_param HTTPS on; fastcgi_param HTTP_SCHEME https; access_log /var/log/nginx/identifyImg.access.log; error_log /var/log/nginx/identifyImg.error.log; location /api { include uwsgi_params; uwsgi_pass 127.0.0.1:8000; uwsgi_read_timeout 600; } location / { expires 30d; autoindex is; add_header Cache-Control private; alias / var / www / vsport_web / web /; try_files $uri $uri/ /index.html; } }
3. A very pitiful step, add the default ssh port open in the Aliyun-console-ecs server-security group rules