多笔立减
This commit is contained in:
parent
7066636c2f
commit
470c256c2d
|
|
@ -0,0 +1 @@
|
|||
docker run -d --name nginx -p 80:80 -p 443:443 -p 9200:9200 -v /var/www/web/vhost:/etc/nginx/conf.d -v /var/www/web/sites:/usr/share/nginx/html nginx
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
upstream voucherServer{
|
||||
least_conn;
|
||||
# 第一个后端服务器
|
||||
server 172.29.42.89:9200;
|
||||
# 新增第二个后端服务器
|
||||
server 172.29.42.90:9200;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name voucher.86698.cn;
|
||||
ssl_certificate /etc/nginx/conf/certs/voucher.pem;
|
||||
ssl_certificate_key /etc/nginx/conf/certs/voucher.key;
|
||||
ssl_session_timeout 5m;
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html/web;
|
||||
index index.html index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /voucher {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header referer $http_referer;
|
||||
proxy_pass http://voucherServer;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
upstream voucher{
|
||||
# 第一个后端服务器
|
||||
server 172.29.42.89:13000 backup;
|
||||
# 新增第二个后端服务器
|
||||
server 172.29.42.90:13000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 9200;
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html/web;
|
||||
index index.html index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /voucher {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header referer $http_referer;
|
||||
proxy_pass http://voucher;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
upstream voucher{
|
||||
# 第一个后端服务器
|
||||
server 172.29.42.89:13000;
|
||||
# 新增第二个后端服务器
|
||||
server 172.29.42.90:13000 backup;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 9200;
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html/web;
|
||||
index index.html index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /voucher {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header referer $http_referer;
|
||||
proxy_pass http://voucher;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue