第1年7月13日 nginx反向代理tomcat

1.

 

server {
    listen 443;
    server_name 127.0.0.1;
    ssl on;
    root /var/www/wtf443;
    index index.html index.htm;
    ssl_certificate  cert/server.pem;
    ssl_certificate_key cert/privkey.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location / {
        proxy_pass http://127.0.0.1:8080;
        #index index.html index.htm;
    }
}
server {
    listen 80;
    server_name 127.0.0.1;
    rewrite ^(.*)$ https://$host$1 permanent;
}

 

https://www.jianshu.com/p/b843e60f9aea

posted @ 2021-07-13 15:40  lianhuaren  阅读(24)  评论(0编辑  收藏  举报