分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

nginx实现https的配置文件

发布时间:2023-09-06 02:32责任编辑:胡小海关键词:配置nginxhttp
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的配置文件

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

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved