浏览器到nginx是https,https代理后端http。

server {
        listen 9601 ssl;
        server_name enca.ulifecam.com;

        ssl_certificate /srv/nginx/conf/ssl/cert.pem;
        ssl_certificate_key /srv/nginx/conf/ssl/cert;
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        location / {
                proxy_redirect http:// $scheme://;
                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_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://127.0.0.1:9600;
        }

}

你可能感兴趣的:(nginx,https,http,linux)