############################g101#########################
upstream g101h{
ip_hash;
server 121.127.230.14:25100;
server 121.127.230.14:25100;
}
upstream g101a{
ip_hash;
server 121.127.230.14:25110;
server 121.127.230.14:25110;
}
upstream g101w{
ip_hash;
server 121.127.230.14:25111;
server 121.127.230.14:25111;
}
server {
listen 80;
server_name 607799.xls-cp168.ws;
server_name 463878.xls-cp168.ws;
server_name 343453.xls-cp168.ws;
server_name 138161.xls-cp168.ws;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 80;
server_name 94294567.xls-cp168.ws;
server_name 87842898.xls-cp168.ws;
server_name 41126879.xls-cp168.ws;
server_name 25375558.xls-cp168.ws;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 80;
server_name 7812205041.xls-cp168.ws;
server_name 5914770308.xls-cp168.ws;
server_name 5050478538.xls-cp168.ws;
server_name 1499691239.xls-cp168.ws;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 443 ssl http2;
server_name 607799.xls-cp168.ws;
server_name 463878.xls-cp168.ws;
server_name 343453.xls-cp168.ws;
server_name 138161.xls-cp168.ws;
#access_log /var/log/nginx/g101.h.ssl.log;
location / {
proxy_pass http://g101h ;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
#try_files $uri $uri/ =404;
}
ssl_certificate /etc/letsencrypt/live/xls-cp168.ws/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xls-cp168.ws/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
listen 443 ssl http2;
server_name 94294567.xls-cp168.ws;
server_name 87842898.xls-cp168.ws;
server_name 41126879.xls-cp168.ws;
server_name 25375558.xls-cp168.ws;
#access_log /var/log/nginx/g101.a.ssl.log;
location / {
proxy_pass http://g101a ;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
#try_files $uri $uri/ =404;
}
ssl_certificate /etc/letsencrypt/live/xls-cp168.ws/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xls-cp168.ws/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
listen 443 ssl http2;
server_name 7812205041.xls-cp168.ws;
server_name 5914770308.xls-cp168.ws;
server_name 5050478538.xls-cp168.ws;
server_name 1499691239.xls-cp168.ws;
#access_log /var/log/nginx/g101.w.ssl.log;
location / {
proxy_pass http://g101w ;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
#try_files $uri $uri/ =404;
}
ssl_certificate /etc/letsencrypt/live/xls-cp168.ws/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xls-cp168.ws/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
############################g101#########################
某个客户上的nginx端口转发负载均衡解决方案
最新推荐文章于 2024-05-21 18:35:13 发布