Nginx 配置https 反向代理

Nginx 反向代理https

使用openssl 生成免费证书:
参考:
https://www.cnblogs.com/ludada/articles/13792809.html

修改/etc/nginx/conf.d/default.conf

server {
    server_name localhost
    listen 80;
    
    #证书文件
    ssl_certificate /etc/nginx/ssl/cert.crt;
    #私钥文件
    ssl_certificate_key /etc/nginx/ssl/cert.key;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;
    # 错误日志文件的位置
    #error_log    logs/nginx/erro   error;     

    location / {
                # 反向代理的ip和端口
        proxy_pass http://119.96.188.75:9999/;

    }
}
posted @ 2020-10-10 13:12  鲁哒哒  阅读(636)  评论(0)    收藏  举报