您的位置:首页 > 理论基础 > 计算机网络

nginx 反向代理https配置

2016-12-07 16:44 573 查看

配置nginx 反向代理https

server {
listen       443 ;#ssl http2 default_server;
server_name  xxxx.com;

#    access_log  logs/quancha.access.log  main;
#    error_log  logs/quancha.error.log;
#root   html;
#index  login_page.php  index.html index.htm index.php;

## send request back to apache ##
ssl                  on;
ssl_certificate      /xxxx.com_bundle.crt;
ssl_certificate_key  /xxxx.com.key;

ssl_session_timeout  5m;
ssl_protocols  SSLv2 SSLv3 TLSv1.2;
#ssl_ciphers  HIGH:!aNULL:!MD5;
ssl_ciphers     ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256:AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
ssl_prefer_server_ciphers   on;

location / {
#Proxy Settings
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;
#proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
#proxy_max_temp_file_size 0;
#proxy_connect_timeout      90;
#proxy_send_timeout         90;
#proxy_read_timeout         90;
#proxy_buffer_size          4k;
#proxy_buffers              4 32k;
#proxy_busy_buffers_size    64k;
#proxy_temp_file_write_size 64k;

proxy_pass  https://192.168.1.11:443/; break;

}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  nginx https 443 代理