首页 > Web开发 > 详细

nginx http正向代理简单配置

时间:2019-09-14 11:51:58      阅读:80      评论:0      收藏:0      [点我收藏+]
#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    #log_format  main  ‘$remote_addr - $remote_user [$time_local] "$request" ‘
    #                  ‘$status $body_bytes_sent "$http_referer" ‘
    #                  ‘"$http_user_agent" "$http_x_forwarded_for"‘;

    #log_format upstreamlog ‘[$time_local] $remote_addr - $remote_user - $server_name to: $upstream_addr: $request upstream_response_time $upstream_response_time msec $msec request_time $request_time‘;

    log_format  main  ‘$status - $proxy_host "$request" $upstream_addr‘;
                      
   

    server
    {
        access_log  logs/access.log  main;
        listen 80;
        location /
        {
            proxy_pass   http://127.0.0.1:5000;
            proxy_read_timeout 9999;
        }
        location /api/fi/aa/v1.0/
        {
            proxy_pass   http://127.0.0.1:8080;
            proxy_read_timeout 9999;
        }
        location /api/fastdweb/runtime/v1.0/
        {
            proxy_pass   http://127.0.0.1:8080;
            proxy_read_timeout 9999;
        }
    }
       
}

 

nginx http正向代理简单配置

原文:https://www.cnblogs.com/wolbo/p/11518624.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!