最近腾讯云买的校园云1核2G服务器,价格真实惠。php
120元/年,官方学生使用,测试 非学生能够体验一年。须要能够买,毕竟10元/月。nginx
云+校园 - 腾讯云小程序
因为我的目前开发我的小程序应用,发现接口请求地址正式环境必须https请求,顺便就将本身的服务器安装ssl证书。如下简单介绍:
腾讯免费一年ssl证书地址服务器
如下为nginx 简单配置session
server { listen 80; server_name www.xx.com; rewrite ^(.*) https://$host$1 permanent;//将http 请求跳转https } server { listen 443; server_name www.xx.com; #填写绑定证书的域名 ssl on; ssl_certificate 1_www.exemple.com_bundle.crt; ssl_certificate_key 2_www.exemple.com.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置 ssl_prefer_server_ciphers on; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Nginx-Proxy true; proxy_set_header Connection ""; proxy_pass http://127.0.0.1:3000; } }