zoukankan      html  css  js  c++  java
  • Nginx支持https转发

    1.配置

    location /api/ {
        	proxy_pass https://uat-trans-safe.jd.com/;
        }
    

    2.如何生效呢
    重新编译nginx,带上参数

    --with-http_ssl_module
    

    举个例子

    ./configure --prefix=/export/servers/nginx --sbin-path=/export/servers/nginx/sbin/nginx --conf-path=/export/servers/nginx/conf/nginx.conf --error-log-path=/export/servers/nginx/logs/error.log --http-log-path=/export/servers/nginx/logs/access.log --pid-path=/export/servers/nginx/var/nginx.pid --lock-path=/export/servers/nginx/var/nginx.lock --http-client-body-temp-path=/dev/shm/nginx_temp/client_body --http-proxy-temp-path=/dev/shm/nginx_temp/proxy --http-fastcgi-temp-path=/dev/shm/nginx_temp/fastcgi --user=admin --group=admin --with-cpu-opt=pentium4F --without-select_module --without-poll_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --without-http_userid_module --without-http_userid_module --without-http_geo_module --without-http_map_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --add-module=/usr/local/src/ngx-tomcat/agentzh-chunkin-nginx-module-51c84e4 --with-pcre=../pcre-8.31 --with-http_ssl_module
    make
    makeinstall
    

    然后重启nginx

    原创:做时间的朋友
  • 相关阅读:
    RHEL iptables
    搭建类似生产环境的RAC
    [大数据入门] Cloudera-Hadoop 理论
    js中的正则表达式【常用】
    html-css-js基本理解和简单总结
    python的socket.recv函数陷阱
    python异步编程--回调模型(selectors模块)
    python并发学习总结
    python描述符学习
    python网络编程基础
  • 原文地址:https://www.cnblogs.com/PythonOrg/p/15656072.html
Copyright © 2011-2022 走看看