我在想一个问题,因为原来的服务是http,现在使用nginx代理https,这样我就必须这样配置 保证服务跳转也能使用https 协议 server { listen 80; server_name xxx.com; rewrite ^(.*) https://$server_name$1 permanent; } # HTTPS server server { listen 443; server_name xxx.com; ssl on; ssl_certificate /usr/local/nginx/ssl/server.crt; ssl_certificate_key /usr/local/nginx/ssl/server.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; location / { proxy_pass http://x.x.x.x/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 100m; } } 如果是这样,在http协议跳转到 https协议之前,是不是可以抓取http的内容,这样https不就起不到加密的效果了 (责任编辑:IT) |