nginx配置https证书
将认证文件xxxxx.key文件和xxxxx.pem文件配置nginx.conf的同级目录下的cert目录(若无则新创建)
nginx.conf配置 映射端口到本地
server {
listen 443;
server_name www.virtulreal.com;
ssl on;
ssl_certificate cert/1740180_www.virtulreal.com.pem;
ssl_certificate_key cert/1740180_www.virtulreal.com.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9001;
}
}