一、Nginx 安装说明(安装包)
参考文档:https://wiki.hiwepy.com/docs/r-proxy/r-proxy-1fabo824g0eib
1、下载安装 Nginx
1.1、安装依赖
yum -y install gcc gcc-c++ pcre pcre-devel zlib-devel expat-devel openssl openssl-devel
# 安装 gcc
yum install gcc-c++
# 安装 PCRE pcre-devel
yum install -y pcre pcre-devel
# 安装zlib
yum install -y zlib zlib-devel
# 安装Open SSL
yum install -y openssl openssl-devel1.2、下载最新的 Nginx 稳定版本( 1.28.0 版本).
官方地址:https://nginx.org/en/download.html
$ cd /usr/local/src && wget https://nginx.org/download/nginx-1.28.0.tar.gz --no-check-certificate
$ tar -xzf nginx-1.28.0.tar.gz && cd nginx-1.28.01.3、编译安装
#执行命令
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
#执行make命令(要是执行不成功请检查最开始安装的四个有没有安装成功)
make
#执行make install命令
make install1.4、PCRE 编译安装
部分情况,Nginx 因为缺少 PCRE模块无法安装,且不能通过命令方式安装PCRE,则可以通过手动安装解决问题。
- PCRE 目前最新版本为 8.45,可以点这里进行下载。 https://sourceforge.net/projects/pcre/files/pcre/ ;
- 使用
tar -zxvf pcre-8.45.tar.gz进行解压。 - 运行
chmod -R 777 /pcre-8.45对当前文件夹授予全部读写权限。 - 切换到
/pcre-8.45目录下,运行./configure进行pcre初始化配置,会在控制台打印出一大堆的输出信息。 - 执行
make操作,进行编译。 - 运行
make install,进行安装,至此PCRE安装完成。
2、开机启动
创建 Nginx 开机启动 nginx.service
$ vi /lib/systemd/system/nginx.service脚本内容:
[Unit]
Description=Nginx - high performance web server
After=nginx.service
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
Execenable=/usr/local/nginx/sbin/nginx
[Install]
WantedBy=multi-user.target设置随机启动:
systemctl daemon-reload
# 设置开机启动
systemctl enable nginx
# 取消开机自启动
#systemctl disable nginx
# 查看服务当前状态
systemctl status nginx
# 启动nginx服务
systemctl start nginx
# 停止nginx服务
systemctl stop nginx
# 重启nginx服务
systemctl restart nginx3、优化 nginx.conf
创建文件目录
# 创建 Nginx 缓存目录
mkdir -p /usr/local/nginx/proxy_cache_dir;
# 创建 Nginx 代理配置目录
mkdir -p /usr/local/nginx/vhost执行下面命令,编辑 nginx.conf
vi /usr/local/nginx/conf/nginx.conf配置文件
#user nobody;
worker_processes auto; # 自动检测CPU核心数
worker_rlimit_nofile 655350; # 每个worker进程的最大文件描述符数量
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid nginx.pid;
events {
worker_connections 65535; # 每个worker进程的最大连接数
multi_accept on; # 一次接受所有新连接
use epoll; # 使用epoll事件模型
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user - $upstream_addr - $request_time/$upstream_response_time [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"';
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
# 连接优化
keepalive_timeout 65;
keepalive_requests 10000;
# 缓冲区优化
types_hash_max_size 4096;
variables_hash_max_size 4096;
variables_hash_bucket_size 128;
server_names_hash_max_size 2048;
server_names_hash_bucket_size 512;
client_header_buffer_size 32k;
client_max_body_size 200m;
large_client_header_buffers 4 32k;
output_buffers 1 32k;
postpone_output 1460;
# 文件优化
sendfile on;
tcp_nopush on;
tcp_nodelay on;
# Gzip压缩设置
gzip on;
gzip_min_length 100k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 6;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
# 限制每个IP的请求速率为10r/s
limit_conn_zone $binary_remote_addr zone=perip:10m;
# 限制连接数
limit_conn_zone $server_name zone=perserver:10m;
# include vhost
include /usr/local/nginx/vhost/*.conf;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}二、Nginx 配置反向代理
准备工作
# 创建项目日志目录
mkdir -p /www/wwwlogs
# 创建项目静态资源目录
mkdir -p /www/wwwroot/xhxt.pueduyun.cn/tyba;
# 拷贝 Nginx 默认页面进入到项目目录下用于测试
cp /usr/local/nginx/html/index.html /www/wwwroot/xhxt.pueduyun.cn
cp /usr/local/nginx/html/index.html /www/wwwroot/xhxt.pueduyun.cn/tyba2、简单配置实例,测试 Nginx 是否可以访问
进入到 Nginx 配置文件目录,首次编辑配置文件,请遵循 域名.conf 的格式
cd /usr/local/nginx/vhost/ && vi xhxt.pueduyun.cn.conf;配置文件
server {
listen 80;
server_name xhxt.pueduyun.cn;
index index.html index.htm default.htm default.html;
root /www/wwwroot/xhxt.pueduyun.cn;
# nacos
location /tyba/nacos/ {
proxy_pass http://192.168.21.129:18848;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}
# xxl-job-admin
location /tyba/xxl-job-admin/ {
proxy_pass http://192.168.21.129:18080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}
# 默认访问地址
location /tyba/ {
root /www/wwwroot/xhxt.pueduyun.cn;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
location / {
root /www/wwwroot/xhxt.pueduyun.cn;
index index.html index.htm;
}
access_log /www/wwwlogs/xhxt.pueduyun.cn.log;
error_log /www/wwwlogs/xhxt.pueduyun.cn.error.log;
}重载 Nginx 配置
/usr/local/nginx/sbin/nginx -s reload访问域名 http://xhxt.pueduyun.cn/tyba
3、编辑配置文件,补全完成配置
进入到 Nginx 配置文件目录,再次编辑配置文件,请遵循 域名.conf 的格式
cd /usr/local/nginx/vhost/ & vi xhxt.pueduyun.cn.conf;配置文件
# Web缓存目录和参数设置
proxy_cache_path /usr/local/nginx/proxy_cache_dir/xhxt.pueduyun.cn levels=1:2 keys_zone=cache_xhxt_pueduyun_cn:100m inactive=1d max_size=5g;
server {
listen 80;
server_name xhxt.pueduyun.cn;
index index.html index.htm default.htm default.html;
root /www/wwwroot/xhxt.pueduyun.cn;
#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
add_header Strict-Transport-Security "max-age=31536000";
error_page 497 https://$host$request_uri;
#SSL-END
#ERROR-PAGE-START 错误页配置,可以注释、删除或修改
#error_page 404 /404.html;
#error_page 502 /502.html;
#ERROR-PAGE-END
#REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
include /www/server/panel/vhost/rewrite/xhxt.pueduyun.cn.conf;
#REWRITE-END
#禁止访问的文件或目录
location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
#一键申请SSL证书验证目录相关设置
location ~ \.well-known{
allow all;
}
#禁止在证书验证目录放入敏感文件
if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {
return 403;
}
# 例如,处理大文件上传或下载时,可能需要增加 `client_body_timeout` 和 `send_timeout`,以避免请求超时。对于需要频繁查询数据库或进行复杂计算的后端服务,可以增加 `proxy_read_timeout` 来确保请求能够顺利处理。
# 设置客户端请求头的读取超时时间为60秒
client_header_timeout 60s;
# 设置客户端请求体的读取超时时间为600秒
client_body_timeout 600s;
# 设置客户端向服务器发送请求并且等待服务器返回数据的时间为600秒。
send_timeout 600s;
# 设置与代理服务器建立连接的超时时间为30秒(给代理服务留够充足时间来处理请求)
proxy_connect_timeout 300s;
# 设置将请求发送给代理服务器的超时时间为600秒(防止导出/下载响应比久导致超时, 如果连续的60s内没有发送1个字节, 连接关闭)
proxy_send_timeout 600s;
# 设置从代理服务器读取响应的超时时间为120秒(防止并发高时,接口响应慢导致超时,如果连续的1800s内没有收到1个字节, 连接关闭)
proxy_read_timeout 1800s;
# 设置长连接的超时时间为60秒
keepalive_timeout 60s;
# 校园大脑-开放API(新)
location ~ /tyba/open-api/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/open-api/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_bmp_open_api;
}
# 综合评价-开放API
location ~ /tyba/open-api-v2/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/open-api-v2/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_e8n_open_api;
}
# 综合评价 — 过程评价API
location ~ /tyba/eva-api/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/eva-api/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_eva_api;
}
# 业务中台-API网关
location ~ /tyba/api/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_bmp_api;
}
# 综合评价 - 文档服务API
location ~ /tyba/doc-api/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/doc-api/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_doc_api;
}
# 综合评价 — 过程评价开放API
location ~ /tyba/e8n-open-api/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/e8n-open-api/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_e8n_open_api;
}
# 综合评价 - 成长档案API
location ~ /tyba/growth-api/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/growth-api/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_growth_api;
}
# 基础服务 - 安全审计API
location ~ /tyba/log-api/ {
if ($request_method = OPTIONS ) {
return 200;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
rewrite ^/tyba/log-api/(.*)$ /$1 break;
proxy_pass http://xhxt_pueduyun_cn_log_api;
}
# nacos
location /tyba/nacos/ {
proxy_pass http://192.168.21.129:18848;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}
# xxl-job-admin
location /tyba/xxl-job-admin/ {
proxy_pass http://192.168.21.129:18080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}
# 教师发展平台 - pc端
location ^~ /tyba/tdp-web {
proxy_pass http://xhxt_pueduyun_cn_tdp_ui;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
#Set Nginx Cache
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) {
expires 7d;
}
}
# 教师发展平台 - h5端
location ^~ /tyba/tdp-h5 {
proxy_pass http://xhxt_pueduyun_cn_tdp_h5;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
#Set Nginx Cache
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) {
expires 7d;
}
}
# 教师发展平台 - screen端
location ^~ /tyba/tdp-screen/ {
proxy_pass http://xhxt_pueduyun_cn_tdp_screen;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
#Set Nginx Cache
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) {
expires 7d;
}
}
# 校园大脑 - 开放平台
location ^~ /tyba/dop/ {
proxy_pass http://xhxt_pueduyun_cn_dop_ui/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 数据中台 - 数据仓控制台
location ^~ /tyba/dw-admin/ {
proxy_pass http://xhxt_pueduyun_cn_dw_admin_ui/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 数据中台 - ETL
location ^~ /tyba/etl/ {
proxy_pass http://xhxt_pueduyun_cn_dw_etl_ui/etl/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 综合评价 - 成长档案UI
location ^~ /tyba/growth-new/ {
proxy_pass http://xhxt_pueduyun_cn_growth_ui_v2/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
#rewrite ^/growth-v2/(.*)$ /growth-new/$1 break;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 综合评价 - 成长档案H5
location ^~ /tyba/growthMobile-new/ {
proxy_pass http://xhxt_pueduyun_cn_growth_h5_v2/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 综合评价 - 成长档案打印端UI
location ^~ /tyba/growthPrint-new/ {
proxy_pass http://xhxt_pueduyun_cn_growth_print_v2/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
# 代理缓存配置
# 1、设置缓存区域名称
proxy_cache cache_xhxt_pueduyun_cn;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 10m; #200缓存10分钟
proxy_cache_valid 304 5m; #304缓存5分钟
proxy_cache_valid 301 302 5m; #301 302缓存5分钟
proxy_cache_valid any 1m; #其他未设置的状态码缓存1分钟
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_cache_min_uses 3;
# 缓存锁防止缓存击穿
proxy_cache_lock on;
proxy_cache_lock_timeout 5s;
# 缓存绕过条件
#proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment;
proxy_no_cache $cookie_nocache $arg_nocache $arg_comment;
# 响应头
add_header X-Cache $upstream_cache_status;
proxy_ignore_headers Set-Cookie Cache-Control expires;
}
# 综合评价 - 运维管理后台
location ^~ /tyba/sop/ {
proxy_pass http://xhxt_pueduyun_cn_sop_ui;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
#Set Nginx Cache
if ( $uri ~* "\.(gif|png|jpg|jpeg|css|js|woff|woff2)$" ) {
expires 365d;
}
# 设置页面不缓存以 html、htm 结尾的文件
if ($request_filename ~* .*\.(?:htm|html)$) {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0";
add_header Pragma no-cache;
add_header Expires 0;
expires off;
}
}
# 综合评价 - 商户运营后台(Merchant Operation Platform)
location ^~ /tyba/mop/ {
proxy_pass http://xhxt_pueduyun_cn_mop_ui;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
}
# 综合评价 - 过程评价H5
location ^~ /tyba/e8n-h5/ {
proxy_pass http://xhxt_pueduyun_cn_e8n_h5;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 综合评价 - 新版过程评价H5
location ^~ /tyba/zhpj-h5/ {
proxy_pass http://xhxt_pueduyun_cn_e8n_h5;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
#proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
location ^~ /tyba/zhpjportal {
proxy_pass http://xhxt_pueduyun_cn_portal_ui_zjjy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 校园大脑 - 个人门户 - H5
location ^~ /tyba/portalh5 {
proxy_pass http://xhxt_pueduyun_cn_portal_h5/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
}
# 校园大脑 - 个人门户 UI(准版本)
location ^~ /tyba/portal {
proxy_pass http://xhxt_pueduyun_cn_portal_ui/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
}
# 校园大脑 - 考勤 - H5
location ^~ /tyba/attendh5/ {
proxy_pass http://xhxt_pueduyun_cn_attend_h5/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
}
# 校园大脑 - 考勤 UI(准版本)
location ^~ /tyba/attend/ {
proxy_pass http://xhxt_pueduyun_cn_attend_ui/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
}
# 综合评价 - 成长树H5
location ^~ /tyba/zhpj-growth-tree/ {
proxy_pass http://xhxt_pueduyun_cn_growth_tree_ui;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# —— 1) 静态资源:长缓存 ——
location ~* ^/tyba/exchange/.*\.(?:gif|png|jpg|jpeg|css|js|woff2?)$ {
proxy_pass http://xhxt_pueduyun_cn_exchange_h5;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
expires 1d;
add_header Cache-Control "public" always;
proxy_ignore_headers Cache-Control Expires;
}
# 综合评价-兑换机H5
location ^~ /tyba/exchange/ {
#设置反向代理
proxy_pass http://xhxt_pueduyun_cn_exchange_h5;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# —— 彻底关闭缓存 ——
expires off;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy#-revalidate" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
proxy_ignore_headers Cache-Control Expires;
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 综合评价 - 桌面端UI
location ^~ /tyba/desktop/ {
#设置反向代理
proxy_pass http://xhxt_pueduyun_cn_desktop_ui/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# —— 彻底关闭缓存 ——
expires off;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy#-revalidate" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
# 综合评价-电子班牌UI(艾道-竖版)
location ^~ /tyba/dzbp/ {
#设置反向代理
proxy_pass http://xhxt_pueduyun_cn_dzbp_ui;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
#Set Nginx Cache
if ( $uri ~* "\.(gif|png|jpg|jpeg|css|js|woff|woff2)$" ) {
expires 1d;
}
}
# 综合评价 - 个人门户UI
location /tyba/ {
proxy_pass http://xhxt_pueduyun_cn_portal_ui_zjjy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
# 设置页面不缓存
if ($request_filename ~* "\.(html|htm)$") {
add_header Cache-Control "no-store, no-cache, must-revalidate, private, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Last-Modified $date_gmt always;
add_header ETag "" always;
add_header Expires 0;
expires off;
}
# 静态资源缓存策略
if ( $uri ~* "\.(gif|png|jpg|jpeg|bmp|swf)$" ) {
expires 1h;
}
if ( $uri ~* "\.(css|js)$" ) {
expires 30m;
}
if ( $uri ~* "\.(woff|woff2|ttf)$" ) {
expires 30d;
}
}
access_log /www/wwwlogs/xhxt.pueduyun.cn.log;
error_log /www/wwwlogs/xhxt.pueduyun.cn.error.log;
}
# 统一身份认证平台
upstream xhxt_pueduyun_cn_cas {
server 192.168.3.131:30760 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.132:30760 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.133:30760 weight=1 max_fails=5 fail_timeout=60s;
ip_hash;
keepalive 256;
}
# 业务中台-API网关
upstream xhxt_pueduyun_cn_bmp_api {
server 192.168.21.129:31878 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31878 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31878 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 业务中台-开放API
upstream xhxt_pueduyun_cn_bmp_open_api {
server 192.168.21.129:30123 weight=1 max_fails=30 fail_timeout=180s;
#server 192.168.21.130:30123 weight=1 max_fails=30 fail_timeout=180s;
#server 192.168.21.131:31947 weight=1 max_fails=30 fail_timeout=180s;
least_conn;
keepalive 256;
}
# 综合评价 — 过程评价API
upstream xhxt_pueduyun_cn_eva_api {
server 192.168.21.129:31947 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31947 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31947 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 — 过程评价开放API
upstream xhxt_pueduyun_cn_e8n_open_api {
server 192.168.21.129:30397 weight=1 max_fails=30 fail_timeout=180s;
#server 192.168.21.130:30397 weight=1 max_fails=30 fail_timeout=180s;
#server 192.168.21.131:30397 weight=1 max_fails=30 fail_timeout=180s;
least_conn;
keepalive 256;
}
# 综合评价 - 成长档案API
upstream xhxt_pueduyun_cn_growth_api {
server 192.168.21.129:31947 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31947 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31947 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 — 文档服务API
upstream xhxt_pueduyun_cn_doc_api {
server 192.168.21.129:32217 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32217 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32217 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 基础服务 - 安全审计API
upstream xhxt_pueduyun_cn_log_api {
server 192.168.3.61:32594 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.62:32594 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.63:32594 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 可视化大屏服务
upstream xhxt_pueduyun_cn_bigscreen_api {
server 192.168.21.129:32461 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32461 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32461 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 可视化大屏服务UI
upstream xhxt_pueduyun_cn_bigscreen_ui {
server 192.168.21.129:30937 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30937 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30937 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 个人门户UI(省厅版本)
upstream xhxt_pueduyun_cn_portal_ui_zjjy {
server 192.168.21.129:31495 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31495 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31495 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 标准管理
upstream xhxt_pueduyun_cn_evaluation_ui {
server 192.168.21.129:32061 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32061 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32061 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 业务中台 - 组织中枢
upstream xhxt_pueduyun_cn_dsp_ui {
server 192.168.21.129:30915 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30915 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30915 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 业务中台 - 开放平台
upstream xhxt_pueduyun_cn_dop_ui {
server 192.168.21.129:31088 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31088 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31088 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 数据中台 - 数据仓控制台
upstream xhxt_pueduyun_cn_dw_admin_ui {
server 192.168.21.129:31753 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31753 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31753 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 数据中台 - ETL
upstream xhxt_pueduyun_cn_dw_etl_ui {
server 192.168.3.131:31314 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.132:31314 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.133:31314 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 非纸笔测评 - Web端UI
upstream xhxt_pueduyun_cn_paperless_ui {
server 192.168.3.161:30574 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.162:30574 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.163:30574 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 非纸笔测评 - H5端UI
upstream xhxt_pueduyun_cn_paperless_h5 {
server 192.168.3.161:32001 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.162:32001 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.163:32001 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 非纸笔测评 - 打印端UI
upstream xhxt_pueduyun_cn_paperless_print {
server 192.168.3.161:30967 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.162:30967 weight=1 max_fails=5 fail_timeout=60s;
server 192.168.3.163:30967 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 运维管理后台
upstream xhxt_pueduyun_cn_sop_ui {
server 192.168.21.129:30741 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30741 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30741 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 商户运营后台(Merchant Operation Platform)
upstream xhxt_pueduyun_cn_mop_ui {
server 192.168.21.129:30180 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30180 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30180 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 前端公共模块
upstream xhxt_pueduyun_cn_publicmodule_ui {
server 192.168.21.129:31775 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31775 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31775 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 过程评价H5
upstream xhxt_pueduyun_cn_e8n_h5 {
server 192.168.21.129:32352 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32352 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32352 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 成长档案UI - V2
upstream xhxt_pueduyun_cn_growth_ui_v2 {
server 192.168.21.129:32604 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32604 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32604 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 成长档案H5 - V2
upstream xhxt_pueduyun_cn_growth_h5_v2 {
server 192.168.21.129:30449 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30449 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30449 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 成长档案打印端UI - V2
upstream xhxt_pueduyun_cn_growth_print_v2 {
server 192.168.21.129:31584 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31584 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31584 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 成长树
upstream xhxt_pueduyun_cn_growth_tree_ui {
server 192.168.21.129:30972 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30972 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30972 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 兑换机H5
upstream xhxt_pueduyun_cn_exchange_h5 {
server 192.168.21.129:32566 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32566 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32566 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 桌面端UI
upstream xhxt_pueduyun_cn_desktop_ui {
server 192.168.21.129:32101 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32101 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32101 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价-电子班牌UI(艾道-竖版)
upstream xhxt_pueduyun_cn_dzbp_ui {
server 192.168.21.129:30525 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30525 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30525 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 应用监控服务UI
upstream xhxt_pueduyun_cn_apm_ui {
server 192.168.3.99:31701 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 综合评价 - 应用监控服务
upstream xhxt_pueduyun_cn_apm_api {
server 192.168.3.99:31700 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 校园大脑 - 个人门户UI(准版本)
upstream xhxt_pueduyun_cn_portal_ui {
server 192.168.21.129:32661 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:32661 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:32661 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 校园大脑 - 个人门户H5
upstream xhxt_pueduyun_cn_portal_h5 {
server 192.168.21.129:30775 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30775 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30775 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 校园大脑 - 考勤 UI
upstream xhxt_pueduyun_cn_attend_ui {
server 192.168.21.129:31645 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:31645 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:31645 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 校园大脑 - 考勤 H5
upstream xhxt_pueduyun_cn_attend_h5 {
server 192.168.21.129:30191 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30191 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30191 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 教师发展平台 - pc端
upstream xhxt_pueduyun_cn_tdp_ui {
server 192.168.21.129:30302 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30302 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30302 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 教师发展平台 - h5端
upstream xhxt_pueduyun_cn_tdp_h5 {
server 192.168.21.129:30301 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30301 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30301 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}
# 教师发展平台 - screen端
upstream xhxt_pueduyun_cn_tdp_screen {
server 192.168.21.129:30304 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.130:30304 weight=1 max_fails=5 fail_timeout=60s;
#server 192.168.21.131:30304 weight=1 max_fails=5 fail_timeout=60s;
least_conn;
keepalive 256;
}作者:杭州天音 创建时间:2025-05-30 10:04
最后编辑:杭州天音 更新时间:2025-11-07 09:18
最后编辑:杭州天音 更新时间:2025-11-07 09:18