nginx配置

# 全局块

worker_processes  4;  # 允许生成worker process数。

daemon off; # 确定nginx是否应该成为守护进程。主要用于开发过程中。

error_log logs/error.log debug; # 错误生成的文件地址

#events块

events {
    worker_connections  1024;  #设置工作进程可以打开的最大并发连接数。
}

#http块

http {
    include       mime.types;  #包含另一个file或与指定匹配的文件mask到配置中。包含的文件应包含语法正确的指令和块。
    default_type  application/octet-stream; 
    client_max_body_size 5000m;


    sendfile        on;

    keepalive_timeout  65;


    fastcgi_connect_timeout 600;
    fastcgi_send_timeout 600;
    fastcgi_read_timeout 600;

    proxy_connect_timeout 600;             
    proxy_read_timeout    600;              
    proxy_send_timeout    600;             

    upstream phpfastcgi_proxy {
        server 127.0.0.1:9000;
        server 127.0.0.1:9001;
        server 127.0.0.1:9002;
        server 127.0.0.1:9001;
    }

    underscores_in_headers on;

#server块    

#hrui
server {
    listen       1222;
    server_name  172.30.34.51;
    #hrui  本地地址
    location /hrui {
        proxy_pass http://172.30.34.51:8082/;
    }
    #HRUI 后端地址
    location /hrs {
    # proxy_pass  http://192.168.2.8:8662/hrs; #测试环境
        proxy_pass   http://172.30.34.174:6082/; # **
    }
    #oaui2S 后端地址
    location /oas {
        proxy_pass http://192.168.2.8:21583/oas; #OAservice2 测试空间OASERVICE2
        # proxy_pass http://172.30.34.174:7989/; # **
        # proxy_pass  http://172.30.34.55:7989/; #  **
    }
    #CW 后端地址
    location /cws {
        proxy_pass http://192.168.2.8:21583/cws; #OAservice2 测试空间OASERVICE2
        # proxy_pass http://172.30.34.39:1111/; # **
        # proxy_pass http://172.30.34.174:6083/; # **
    }
    # ftp(ui3ftp) 文件上传
    location /resources {
        #proxy_pass http://172.30.34.8:3100/;
        proxy_pass http://172.30.34.40:6241/; # **
    }
}

#OA  nginx配置
    server {
        listen       1200;
        server_name  172.30.34.51;
        #oaold
        location / {
            proxy_pass http://172.30.34.51:8001; # **  oaold
        }
        #UI2
        location /ui2 {
            proxy_pass http://172.30.34.51:1277/; # **  ui2
        }
        #UI3
        location /ui3 {
            proxy_pass http://172.30.34.51:8081/; # **  ui3
        }
        #oaui2S 后端地址
        location /oas {
            # proxy_pass http://172.30.34.174:7989/; # **
            # proxy_pass http://172.30.34.76:7989/; # **
            # proxy_pass  http://172.30.34.55:7989/; # **
            proxy_pass  http://192.168.2.8:21583/oas/; # **
            # proxy_pass  http://172.30.34.40:6248/; # **
      #  proxy_pass http://172.30.34.79:9022/; # **
      # proxy_pass  http://172.30.34.39:8123/; # **
        }
        #CW 后端地址
        location /cws {
            # proxy_pass http://172.30.34.76:7021/; # **
            # proxy_pass http://172.30.34.39:1249/; # **
            proxy_pass  http://192.168.2.8:21583/cws/; #测试环境
        }
        #oaui3 ftp 图片上传
        location /resources {
            # proxy_pass http://http://192.168.0.8:21591/resources;#测试环境
            proxy_pass http://172.30.34.40:6241/; # **
        }
    }

#OAUI2 V2.0
    server {
        listen      1277;
        server_name 172.30.34.51;
        location / {
            root    E:/sixi-pro/DJL/OA/OAUI2;
            index   index.html index.htm index.php;
            if (!-e $request_filename) {
               rewrite  ^/(.*)$  /index.php/$1  last;
               break;  
            }
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root    E:/sixi-pro/DJL/OA/OAUI2;
        }
        location ~ \.php {
            root    E:/sixi-pro/DJL/OA/OAUI2;
            fastcgi_pass    127.0.0.1:9000;
            fastcgi_index   index.php;
            include        fastcgi.conf;

            set $fastcgi_script_name2 $fastcgi_script_name;
            if ($fastcgi_script_name2 ~ "^(.+\.php)(/.+)$") {
                set $fastcgi_script_name2 $1;
                set $path_info $2;
            }  
            fastcgi_param   PATH_INFO $path_info;
            fastcgi_param   SCRIPT_FILENAME   $document_root$fastcgi_script_name2;
            fastcgi_param   SCRIPT_NAME   $fastcgi_script_name2;
        }
    }

}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

晴天有点孤单

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值