码迷,mamicode.com
首页 > Web开发 > 详细

nginx实现https的配置文件

时间:2019-02-11 17:03:24      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:ref   listen   write   for   com   ica   remote   http   col   

server
{
        listen 80;
        server_name testplatform.itegou.com;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host:$server_port;
     rewrite ^(.*)$  https://$host$1 permanent; #http强制跳转到https location
/ { proxy_pass http://192.168.1.10:8011; } } server { listen 443 ssl; server_name testplatform.itegou.com; ssl_certificate /usr/local/nginx/ssl/SSLCity.crt; ssl_certificate_key /usr/local/nginx/ssl/SSLCity.key; ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://192.168.1.10:8011; } }

 

nginx实现https的配置文件

标签:ref   listen   write   for   com   ica   remote   http   col   

原文地址:https://www.cnblogs.com/python-cat/p/10362282.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!