当前位置:网站首页>Configure load balancing
Configure load balancing
2022-07-01 09:37:00 【tjg888888】
Front end project domain name profile
upstream backendapi {
#ip_hash;
server stg_api2.vfinemusic.com:8081;
server bro_api2.vfinemusic.com:8080;
}
server {
listen 80;
client_max_body_size 10240M;
server_name stg_broadmin.vfinemusic.com;
access_log /data/logs/nginx/access_nginx.log combined;
error_log /data/logs/nginx/error_nginx.log;
set $root_path '/www/bro-admin/admin-system/admin/dist';
root $root_path;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php {
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index /index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://broapi.vfinemusic.com/;
}
}
server {
listen 443 ssl;
client_max_body_size 10240M;
server_name stg_broadmin.vfinemusic.com;
access_log /data/logs/nginx/access_nginx.log combined;
error_log /data/logs/nginx/error_nginx.log;
set $root_path '/www/bro-admin/admin-system/admin/dist';
root $root_path;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
ssl_certificate /usr/local/openresty/nginx/ssl/vfinemusic.cer;
ssl_certificate_key /usr/local/openresty/nginx/ssl/vfinemusic.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_session_cache builtin:1000 shared:SSL:10m;
# openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
# ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;
location ~ \.php {
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index /index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
# proxy_pass https://broapi.vfinemusic.com/;
proxy_pass http://backendapi/;
}
}
stg_api2.vfinemusic.com Domain name profile content
server {
listen 8081;
server_name stg_api2.vfinemusic.com;
access_log /data/logs/nginx/access_nginx.log combined;
error_log /data/logs/nginx/error_nginx.log;
set $root_path '/www/bro-api/public';
root $root_path;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index /index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
}
#server {
# listen 443 ssl;
# server_name stg_api2.vfinemusic.com;
# ssl_certificate /usr/local/openresty/nginx/ssl/vfinemusic.cer;
# ssl_certificate_key /usr/local/openresty/nginx/ssl/vfinemusic.key;
# ssl_session_timeout 5m;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_prefer_server_ciphers on;
# ssl_session_cache builtin:1000 shared:SSL:10m;
# access_log /data/logs/nginx/access_nginx.log combined;
# error_log /data/logs/nginx/error_nginx.log;
# set $root_path '/www/bro-api/public';
# root $root_path;
# index index.php index.html index.htm;
# try_files $uri $uri/ @rewrite;
# location @rewrite {
# rewrite ^/(.*)$ /index.php?_url=/$1;
# }
# location ~ \.php {
# fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/dev/shm/php-cgi.sock;
# fastcgi_index /index.php;
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_param PATH_INFO $fastcgi_path_info;
# fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
# }
# location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
# root $root_path;
# }
# location ~ /\.ht {
# deny all;
# }
# location ~ ^/php-fpm_status$ {
# fastcgi_pass unix:/dev/shm/php-cgi.sock;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi.conf;
# }
# }
bro_api2.vfinemusic.com Domain name profile content
server {
listen 8080;
server_name bro_api2.vfinemusic.com;
access_log /data/logs/nginx/access_nginx.log combined;
error_log /data/logs/nginx/error_nginx.log;
set $root_path '/www/bro-api/public';
root $root_path;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index /index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
}
#server {
# listen 443 ssl;
# server_name stg_api2.vfinemusic.com;
# ssl_certificate /usr/local/openresty/nginx/ssl/vfinemusic.cer;
# ssl_certificate_key /usr/local/openresty/nginx/ssl/vfinemusic.key;
# ssl_session_timeout 5m;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_prefer_server_ciphers on;
# ssl_session_cache builtin:1000 shared:SSL:10m;
# access_log /data/logs/nginx/access_nginx.log combined;
# error_log /data/logs/nginx/error_nginx.log;
# set $root_path '/www/bro-api/public';
# root $root_path;
# index index.php index.html index.htm;
# try_files $uri $uri/ @rewrite;
# location @rewrite {
# rewrite ^/(.*)$ /index.php?_url=/$1;
# }
# location ~ \.php {
# fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/dev/shm/php-cgi.sock;
# fastcgi_index /index.php;
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_param PATH_INFO $fastcgi_path_info;
# fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
# }
# location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
# root $root_path;
# }
# location ~ /\.ht {
# deny all;
# }
# location ~ ^/php-fpm_status$ {
# fastcgi_pass unix:/dev/shm/php-cgi.sock;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi.conf;
# }
# }
边栏推荐
- 【pytorch】nn.AdaptiveMaxPool2d
- JS scope chain and closure
- [pytorch] softmax function
- 2.4 激活函数
- 2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder
- Unity tips for reducing the amount of code -- empty protection extension
- 2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder
- js函数arguments对象
- 谁拥有穿越周期的眼光?
- 123. how to stop a thread?
猜你喜欢

js作用域链与闭包

【pytorch】nn. Crossentropyloss() and nn NLLLoss()
![delete和delete[]引发的问题](/img/d9/a1c3e5ce51ef1be366a973aa42d1f0.png)
delete和delete[]引发的问题

2022.02.15_ Daily question leetcode six hundred and ninety

2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder

3D printing Arduino four axis aircraft

Structure de l'arbre - - - arbre binaire 2 traversée non récursive

计网01-物理层

Flinkv1.13 implementation of financial anti fraud cases

OSPF - virtual link details (including configuration commands)
随机推荐
遇到女司机业余开滴滴,日入500!
树结构---二叉树1
Sd-wan notes
SQL学习笔记(02)——数据库表操作
JS prototype chain
【leetcode】287. Find duplicates
利用闭包实现私有变量
es6-顶层对象与window的脱钩
那个程序员,被打了。
Spark's action operator
ESP8266 FreeRTOS开发环境搭建
微信小程序 webview 禁止页面滚动,同时又不影响业务内overflow的滚动的实现方式
MapReduce programming basics
我喜欢两个男人。。。
LeetCode 344. Reverse string
[pytorch] 2.4 convolution function nn conv2d
Closure implementation iterator effect
Problems caused by delete and delete[]
Error org apache. catalina. core. StandardContext. FilterStart start filter exception
NoSQL数据库的安装和使用