悬赏1000分:linux环境nginx转发tomcat时https,httpRequest.getRequestURI()获取的缺是http
浪尖赏花 2016-12-26 09:46:49 现象如题
tomcat设置了
<Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="X-Forwarded-For" protocolHeader="X-Forwarded-Proto" protocolHeaderHttpsValue="https"/>
nginx设置了
server {
listen 18443 ssl;
server_name localhost;
ssl on;
# access_log logs/httpshost.access.log main;
ssl_certificate my.crt;
ssl_certificate_key my.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://myserver;
proxy_set_header Host $host;
proxy_redirect http:// $scheme://;
proxy_set_header X-Forwarded-Proto "https";
}
}
这样设置了还是不行
tomcat6、nginx1.8、jdk1.7
坐等大神解惑,分不够可以另开贴加