当前位置:网站首页>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】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
- Exception handling of classes in C #
- Network counting 01 physical layer
- [pytorch] softmax function
- Flinkv1.13 implementation of financial anti fraud cases
- JS prototype chain
- 2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data
- Mise en œuvre simple de l'équilibrage de la charge par nacos
- 2.3 【kaggle数据集 - dog breed 举例】数据预处理、重写Dataset、DataLoader读取数据
- 队列的实现和应用
猜你喜欢

【电赛训练】红外光通信装置 2013年电赛真题

Flinkv1.13 implementation of financial anti fraud cases

Import and export of power platform platform sharepointlist

遇到女司机业余开滴滴,日入500!

2022.02.15_ Daily question leetcode six hundred and ninety

谁拥有穿越周期的眼光?

Error org apache. catalina. core. StandardContext. FilterStart start filter exception

一个悄然崛起的国产软件,低调又强大!

我喜欢两个男人。。。

LVGL V8.2字符串显示在Keil MDK上需要注意的事项(以小熊派为例)
随机推荐
Record a redis timeout
短路运算符惰性求值
Computer USB, HDMI, DP various interfaces and speeds
2022.02.15_ Daily question leetcode six hundred and ninety
NoSQL数据库的安装和使用
js函数arguments对象
队列的实现和应用
Structure de l'arbre - - - arbre binaire 2 traversée non récursive
Latex插入的eps图片模糊解决方法
2.4 activation function
Simple load balancing with Nacos
JS原型链
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DS18B20 temperature sensor +nodejs local service + MySQL database
Mikrotik Routeros Internet access settings
Day06 branch structure and cycle (III)
Huawei accounts work together at multiple ends to create a better internet life
A 419 error occurred in the laravel postman submission form. July 6th, 2020 diary.
Clickhouse: Test on query speed of A-share minute data [Part 2]
Niuke monthly race 22 tree sub chain
SQL学习笔记(03)——数据约束关系