# 全局块
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;
}
}
}
nginx配置
最新推荐文章于 2023-05-24 10:02:23 发布