zoukankan      html  css  js  c++  java
  • Nginx转发配置

    Nginx转发配置

    # upstream web1{
    #                server 172.18.54.3:9201 weight=9;
    #                #tp需要重写路由,本机项目另外起个服务
    #                server 127.0.0.1:9201    weight=1;
    #}
    server
        {
            listen 80;
            #listen [::]:80;
            server_name lapuapi.ilapu.com;
            index index.html index.htm index.php default.html default.htm default.php;
            root  /home/wwwroot/20201114lapu/lapu;
         deny 120.239.72.233;
        #转发红包模块and用户详情
        location ~* .php/Api/(GiftApi|UserApi)/(give_gift_p|click_gift_v1|gift_is_finished|send_gift_exclusive|get_exclusive_gift){
                    # proxy_pass http://127.0.0.1:9501;
                    # proxy_pass http://127.0.0.1:9201;
                    proxy_pass http://test.up;
                    client_max_body_size 1000m;
    
            }
        #转发红包模块and用户详情
        location ~* ^/Api/(GiftApi|UserApi)/(give_gift_p|click_gift_v1|gift_is_finished|send_gift_exclusive|get_exclusive_gift|test){
                   #proxy_pass http://127.0.0.1:9501;
                   #proxy_pass http://127.0.0.1:9201;
                   proxy_pass http://test.up;
                   client_max_body_size 1000m;
    
            }
        #支付模块接口暂时保留到本机
        #location ~* .php/Api/(NcountPay|UserVerifyApi)/{
        #    proxy_pass http://127.0.0.1:9201;
        #    client_max_body_size 1000m;
        #}
        #location ~* ^/Api/(NcountPay|UserVerifyApi)/{
        #    proxy_pass http://127.0.0.1:9201;
            #        client_max_body_size 1000m;
        #}
        #回调
        #location ~* .php/Core/{
        #    proxy_pass http://127.0.0.1:9201;
            #        client_max_body_size 1000m;
        #}
        #location ~* ^/Core/{
            #        proxy_pass http://127.0.0.1:9201;
            #        client_max_body_size 1000m;
            #} 
        #绑卡|提现
        #location ~* .php/Api/UserApi/(BindingCard|BindingCardConfirm|withdrawCash){
        #    proxy_pass http://127.0.0.1:9201;
            #        client_max_body_size 1000m;
        
        #}
        #location ~* ^/Api/UserApi/(BindingCard|BindingCardConfirm|withdrawCash){
        #    proxy_pass http://127.0.0.1:9201;
            #        client_max_body_size 1000m;
        #}
        #转发文件目录
        #实现负载均衡
        #location ~* .php/Api/{
        #    proxy_next_upstream error timeout http_404;
        #    proxy_pass http://web1;
        #}
        #location ~* ^/Api/{
        #    proxy_next_upstream error timeout http_404;
            #         proxy_pass http://web1;
        #}
    
        #注意,因把服务转发到9201,所以不采用tp的重写路由跳转
            include rewrite/thinkphp.conf;
            #error_page   404   /404.html;
    
            # Deny access to PHP files in specific directory
            #location ~ /(wp-content|uploads|wp-includes|images)/.*.php$ { deny all; }
    
    
    
    
            include enable-php-pathinfo.conf;
        
    
    
        
    
    
            location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
            {
                expires     30d;
            }
    
            location ~ .*.(js|css)?$
            {
                expires      12h;
            }
    
            location ~ /.well-known {
                allow all;
            }
        
            location ~ /.
            {
                deny all;
            }
    
            access_log  /home/wwwlogs/giftapi.ilapu.com.log;
        }
    #  root  /home/wwwroot/lapuTP5/public;
    
    server
        {
            listen 80;
            #listen [::]:80;
            server_name test.up;
            index index.html index.htm index.php default.html default.htm default.php;
            #root   /home/wwwroot/lapuTP5;
            root   /home/wwwroot/laputp5/public;
            #root   /home/wwwroot/20201114lapu/lapu;
    
    	    #注意,因把服务转发到9201,所以不采用tp的重写路由跳转
            include rewrite/thinkphp.conf;
            #include rewrite/codeigniter.conf;
    
            include enable-php-pathinfo.conf;
    	
    
            location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
            {
                expires     30d;
            }
    
            location ~ .*.(js|css)?$
            {
                expires      12h;
            }
    
            location ~ /.well-known {
                allow all;
            }
    	
            location ~ /.
            {
                deny all;
            }
    
            access_log  /home/wwwlogs/test.up.log;
        }
    
    ::1    localhost    localhost.localdomain    localhost6    localhost6.localdomain6
    127.0.0.1    localhost    localhost.localdomain    localhost4    localhost4.localdomain4
    
    172.18.54.2    iZwz9fahlffrq9zl6amcjsZ    iZwz9fahlffrq9zl6amcjsZ
    127.0.0.1       gqodbynudtp.ilapu.com
    127.0.0.1       test.up
  • 相关阅读:
    DOM笔记(二):Node接口
    DOM笔记(一):HTMLDocument接口
    mysql_connect v/s mysql_pconnect
    HTML 5:绘制旋转的太极图
    HTML 5:你必须知道的data属性
    CSS:7个你可能不认识的单位
    CSS 3的display:盒类型详解
    PHP:6种GET和POST请求发送方法
    asp.net mvc生命周期学习
    关于sql row_number,rank,dense_rank,ntile函数
  • 原文地址:https://www.cnblogs.com/ccw869476711/p/14100622.html
Copyright © 2011-2022 走看看