当前位置:网站首页>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;
# }
# }
边栏推荐
- JS scope chain and closure
- 睡了二哥。。。
- ES6 decoupling top-level objects from windows
- A 419 error occurred in the laravel postman submission form. July 6th, 2020 diary.
- NoSQL数据库的安装和使用
- 【检测技术课案】简易数显电子秤的设计与制作
- HMS core audio editing service 3D audio technology helps create an immersive auditory feast
- 【pytorch】transforms. Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
- PR training notes
- MT7628K eCos开发入门
猜你喜欢
[pytorch] 2.4 convolution function nn conv2d
Computer USB, HDMI, DP various interfaces and speeds
LVGL V8.2字符串显示在Keil MDK上需要注意的事项(以小熊派为例)
吃一个女富豪的瓜。。。
Hololens2 development -6-eyetracking and speech recognition
js作用域链与闭包
Preparing for the Blue Bridge Cup -- bit operation
Implementation and application of queue
Learning practice: comprehensive application of cycle and branch structure (II)
2.2 【pytorch】torchvision. transforms
随机推荐
年薪100万,在北上广深买的起房子吗?
Network partition notes
Short circuit operator lazy evaluation
【电赛训练】红外光通信装置 2013年电赛真题
2.2 【pytorch】torchvision.transforms
[unity rendering] customized screen post-processing
Introduction to mt7628k eCos development
Spark's action operator
SQL学习笔记(03)——数据约束关系
ES6 decoupling top-level objects from windows
js this丢失问题分析 及 解决方案
【pytorch】nn. Crossentropyloss() and nn NLLLoss()
js变量提升(hoisting)
nacos简易实现负载均衡
Matrix and coordinates
Weidongshan board compilation kernel problem solving
Learning practice: comprehensive application of cycle and branch structure (II)
Construction of esp8266 FreeRTOS development environment
[pytorch] softmax function
HMS Core音频编辑服务3D音频技术,助力打造沉浸式听觉盛宴