nginx配置https http协议

server {
listen 443 ssl;
server_name xxx.xxxx.com;

ssl_certificate /usr/local/nginx/conf/xxx.xxxx.com.crt;
ssl_certificate_key /usr/local/nginx/conf/xxx.xxxx.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!LOW:!aNULL:!eNULL;

#ssl_session_cache shared:SSL:1m;
#ssl_session_timeout 5m;

#ssl_ciphers HIGH:!aNULL:!MD5;
#ssl_prefer_server_ciphers on;

location / {
proxy_pass http://xxx.xxx.xxx.xxx:8080;
}
}


server {
listen 80;
server_name xxx.xxxx.com;

#ssl_certificate cert.pem;
#ssl_certificate_key cert.key;

#ssl_session_cache shared:SSL:1m;
#ssl_session_timeout 5m;

#ssl_ciphers HIGH:!aNULL:!MD5;
#ssl_prefer_server_ciphers on;
location / {
proxy_pass http://xxx.xxx.xxx.xxx:8080;
}
}

posted @ 2021-04-25 10:40  雨后丶云初霁  阅读(124)  评论(0编辑  收藏  举报