?指定 协议 和 代理端口
server { ? ? listen ? ? ? 443; ? ? server_name ?xxx.com; ? ? ssl on; ? ? ssl_certificate /etc/nginx/con/xxx.com.pem; ? ? ssl_certificate_key /etc/nginx/conf/xxx.com.key; ? ? ssl_protocols ? ? ? TLSv1 TLSv1.1 TLSv1.2; ? ? ssl_ciphers ? ? ? ? HIGH:!aNULL:!MD5; ? ? ?location / { ? ? ? ?proxy_pass http://xxx:y; ? ? ? ?proxy_set_header Host $host; ? ? ? ?proxy_set_header ?X-Real-IP ?$remote_addr; ? ? ? ?proxy_set_header X-Forwarded-For $remote_addr; ? ? ? ?#proxy_set_header Host $host:$server_port; ? ? ? ?proxy_set_header X-Forwarded-Proto $scheme; ? ? ? ?proxy_set_header X-Forwarded-Port $server_port; ? ?}
}
配置参考:DevOps-Configuration/nginx-swagger.conf at master · abel1225/DevOps-Configuration · GitHub
|