当前位置:网站首页>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;
# }
# }
边栏推荐
- Wechat applet WebView prohibits page scrolling without affecting the implementation of overflow scrolling in the business
- 睡了二哥。。。
- MapReduce programming basics
- Get the list of a column in phpexcel get the letters of a column
- 利用闭包实现私有变量
- Clickhouse: Test on query speed of A-share minute data [Part 2]
- Hololens2 development -6-eyetracking and speech recognition
- 2.4 activation function
- SQL learning notes (04) - data update and query operations
- js原型陷阱
猜你喜欢

Swift control encapsulation - paging controller

奇怪,为什么ArrayList初始化容量大小为10?

Tree structure -- binary tree 2 non recursive traversal

Design and manufacture of simple digital display electronic scale

Computer USB, HDMI, DP various interfaces and speeds

Preparing for the Blue Bridge Cup -- bit operation

SQL learning notes (01) - basic knowledge of database

集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常

MapReduce programming basics

2.4 activation function
随机推荐
Exception handling of classes in C #
Error org apache. catalina. core. StandardContext. FilterStart start filter exception
[pytorch] 2.4 convolution function nn conv2d
Analysis and solution of JS this loss
Problems caused by delete and delete[]
Mise en œuvre simple de l'équilibrage de la charge par nacos
韦东山板子编译内核问题解决
Project procurement management
MapReduce programming basics
年薪100万,在北上广深买的起房子吗?
集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常
es6-顶层对象与window的脱钩
【pytorch】2.4 卷积函数 nn.conv2d
js this丢失问题分析 及 解决方案
3D printing Arduino four axis aircraft
[video game training] real topic of 2013 video game of infrared optical communication device
phpexcel 里 获取某一列的列表 获取某一列的字母
A 419 error occurred in the laravel postman submission form. July 6th, 2020 diary.
Day06 branch structure and cycle (III)
2.3 【kaggle数据集 - dog breed 举例】数据预处理、重写Dataset、DataLoader读取数据