知识
助手
最大化  清空记录  历史记录
2021-11-01 15:27:39 版本 : nginx 通过https代理tomat 的http
作者: 系统管理员 于 2021年10月28日 发布在分类 / 配置安装 / nginx 下,并于 2021年11月01日 编辑
 历史版本

修改日期 修改人 备注
2022-12-14 19:50:26[当前版本] 系统管理员1 内容更新
2022-12-14 14:51:28 系统管理员1 内容更新
2022-12-13 19:41:31 系统管理员1 内容更新
2022-12-06 09:53:28 系统管理员1 内容更新

1.nginx配置

粘贴图片


            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Scheme  $scheme;
            proxy_set_header Host $host:$server_port;
            proxy_set_header Upgrade-Insecure-Requests 1;   #详细描述(解释) 
            proxy_set_header X-Forwarded-Proto https;

            注意要代理到443端口

2.tomcat配置(tomcat8或tomcat7)

添加如下配置1
<Valve className="org.apache.catalina.valves.RemoteIpValve"  remoteIpHeader="X-Forwarded-For"  protocolHeader="X-Forwarded-Proto" protocolHeaderHttpsValue="https"/>

添加如下配置2

<Connector port="443" maxHttpHeaderSize="8192"
                 maxThreads="150"
                 enableLookups="false" disableUploadTimeout="true"
                 acceptCount="100" scheme="https" secure="true"
                 />

粘贴图片

粘贴图片




历史版本-目录  [回到顶端]
    wcp知识库系统-京ICP备15024440号-1 -V 5.1.3 -wcp