KVM自动快照
crontab -e
0 4 * * * /etc/libvirt/qemu/auto-snapshot.sh
vim /etc/libvirt/qemu/auto-snapshot.sh
#!/bin/bash
export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
# #######################
# Author: LeoLan
# Blog: www.leolan.top
# Data: 201707020
# ENV: Centos 7 KVM
# Script: KVM Auto Snapshot
# #######################
# 脚本加入crontab,每天23点执行一次,0 23 * * * /etc/libvirt/qemu/auto-snapshot.sh
#
###################### 用户设置部分 ###########################
# 填写需要拍摄快照的虚拟机名称,英文逗号隔开,virsh list --all可以查看。
vhost=Test_LVS,LNMP_Test02
###################### 用户设置结束 ###########################
numss=`echo $vhost | awk -F',' '{print NF}'`
for ((i=1;i<=$numss;i++)) do vhostname=`echo $vhost |awk -F "," {'print $'${i}''}`;
virsh snapshot-create-as $vhostname $(date +%Y%m%d)
echo "已创建"$vhostname"的最新快照"$(date +%Y%m%d)
echo "--------------------------------------------------------"
done
# 删除超过7天的快照
olddate=`date -d "$(date +%Y%m%d) -7 day" +%Y%m%d`
# 把字符串时间转换为数字
#oldnum=$(let olddate ${olddate})
oldnum=`expr $olddate`
for ((i=1;i<=$numss;i++)) do
vhostname=`echo $vhost |awk -F "," {'print $'${i}''}`
u=$(virsh snapshot-list ${vhostname} |grep -v "Name" |grep -v "^$"|awk {'print $1'}|wc -l)
for ((l=3;l<=$u;l++)) do
newdate=`virsh snapshot-list ${vhostname} |awk {'print $1'}|awk 'NR=='${l}''`
newnum=`expr $newdate`
if [ $newnum -le $oldnum ];
then
echo "删除"$vhostname"的快照"$newdate
virsh snapshot-delete $vhostname $newdate
echo "--------------------------------------------------------"
else
echo $vhostname "的旧快照" $newdate "还未过期"
echo "--------------------------------------------------------"
fi
done
done
chmod +x /etc/libvirt/qemu/auto-snapshot.sh
缓存服务器部署脚本,不带Mysql
#!/bin/bash
export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
# #######################
# Author: LeoLan
# Blog: www.leolan.top
# Data: 20171021
# ENV: Centos 7
# Script: Install ENV 安装Redis,Rabbitmq,同时加入zabbix监控
# #######################
#### 用户设置部分 ##########
#
#
# set mem 填服务器安装的内存大小,单位是G;设定Redis使用60%的内存。
r="64"
#
#
# 设置zabbix server IP
zabbixip="192.168.10.101"
#### 用户设置结束 ##########
########################################
# 开放端口
systemctl start firewalld
firewall-cmd --set-default-zone=public
firewall-cmd --zone=public --add-port=22/tcp --permanent
firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --zone=public --add-port=5672/tcp --permanent
firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --zone=public --add-port=10050/tcp --permanent
systemctl restart firewalld
# 安装开发库、软件包
yum -y install epel-release && yum -y update
yum install -y gcc glibc gcc-c++ make automake cmake libtool bison flex perl git mercurial socat
yum install -y readline-devel bzip2-devel zlib-devel libxml2-devel libxslt-devel openssl-devel pcre-devel boost-devel python-devel python-setuptools libpcap-devel
yum install -y wget htop vim lsof lrzsz tcpdump net-tools lsof screen mtr nc nmap zip dos2unix sysstat dstat setuptool system-config-* ntsysv mlocate telnet tree
# selinux off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0
########################################
# install redis
yum install -y tcl gcc
wget http://download.redis.io/releases/redis-4.0.1.tar.gz
tar xzf redis-4.0.1.tar.gz
cd redis-4.0.1
make
make test
make install
cp redis.conf /etc/redis.conf
cd ~
cat > /var/run/redis_6379.pid <<EOF
16379
EOF
# 创建redis服务
cat > /etc/systemd/system/redis-server.service <<EOF
[Unit]
Description=The redis-server Process Manager
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/usr/local/bin/redis-server /etc/redis.conf
ExecReload=/bin/kill -USR2
ExecStop=/bin/kill -SIGINT
[Install]
WantedBy=multi-user.target
EOF
# 按业务需求配置redis
i=`expr $r \* 6 / 10 \* 1024 \* 1024 \* 1024`
sed -i "s/# maxmemory <bytes>/maxmemory $i/" /etc/redis.conf #引用变量用双引号
sed -i 's/# maxmemory-policy noeviction/maxmemory-policy volatile-ttl/' /etc/redis.conf
sed -i 's/daemonize no/daemonize yes/' /etc/redis.conf
sed -i 's/timeout 0/timeout 3000/' /etc/redis.conf
sed -i 's/protected-mode yes/protected-mode no/' /etc/redis.conf
sed -i 's/bind 127.0.0.1/#bind 127.0.0.1/' /etc/redis.conf
systemctl daemon-reload
systemctl start redis-server.service
systemctl enable redis-server.service
rm -rf redis-4.0.1*
#####################################################
# install rabbitmq
yum install -y rabbitmq-server
systemctl start rabbitmq-server
systemctl enable rabbitmq-server
rabbitmq-plugins enable rabbitmq_management #开启管理界面
systemctl restart rabbitmq-server
########################################################
# 安装配置 zabbix-agent
rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
yum install -y zabbix-get zabbix-agent zabbix-sender
systemctl stop zabbix-agent
sed -i 's/LogFileSize=0/LogFileSize=1/' /etc/zabbix/zabbix_agentd.conf
sed -i "s/Server=127.0.0.1/Server=$zabbixip/" /etc/zabbix/zabbix_agentd.conf
sed -i "s/ServerActive=127.0.0.1/ServerActive=$zabbixip/" /etc/zabbix/zabbix_agentd.conf
sed -i 's/Hostname=Zabbix server/Hostname=system.hostname/' /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent
systemctl enable zabbix-agent
echo "################### Install Finish ########################"
echo
echo -e "IP:\033[36m`ifconfig |grep inet |awk '{print $2}'|cut -d: -f2 |grep -v '127.0.0.1' |grep -v '192.168.122.1'`\033[0m"
echo
redis:
port:\033[36m 6379\033[0m
\n
RabbitMQ:
port:\033[36m 15672\033[0m
user:\033[36m guset\033[0m password:\033[36m guset \033[0m\n"
echo "##########################################################"
Linux 备份脚本(数据库、文件)
#!/bin/bash
#
#tidate="date +%Y%m%d"
MYUSER=root
MYPASS="12345678"
MYIP="localhost"
MYPORT="3306"
mysqldump jiradb > /root/Backup_Data/jiradb_$(date +%Y%m%d).sql -u$MYUSER -p$MYPASS --host=$MYIP --port=$MYPORT
#
cd /data/atlassian/application-data
tar zcf /root/Backup_Data/jiradb_data_$(date +%Y%m%d).tar.gz jira
cd ~
#
mount -t cifs -o username=backup,password=12345asdfg //192.168.10.115/Data/192.168.10.105\(jira\) /mnt
mv /root/Backup_Data/* /mnt
sleep 20
umount /mnt
缓存服务器部署脚本,带Mysql
#!/bin/bash
export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
# #######################
# Author: LeoLan
# Blog: www.leolan.top
# Data: 20170901
# ENV: Centos 7
# Script: Install ENV 安装Redis,Rabbitmq,Mysql,同时加入zabbix监控
# #######################
#### 用户设置部分 ##########
#
#
# set mem 填服务器安装的内存大小,单位是G;设定Redis使用60%的内存。
r="64"
#
# 设置MySQL密码
newpasswd="123456789"
#
# 设置zabbix server IP
zabbixip="192.168.10.101"
#### 用户设置结束 ##########
########################################
# 开放端口
systemctl start firewalld
firewall-cmd --set-default-zone=public
firewall-cmd --zone=public --add-port=22/tcp --permanent
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --zone=public --add-port=5672/tcp --permanent
firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --zone=public --add-port=10050/tcp --permanent
systemctl restart firewalld
# 安装开发库、软件包
wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_20.0-1~centos~7_amd64.rpm
rpm -ivh esl-erlang_20.0-1~centos~7_amd64.rpm
yum -y install epel-release && yum -y update
yum install -y gcc glibc gcc-c++ make automake cmake libtool bison flex perl git subversion mercurial socat erlang
yum install -y readline-devel bzip2-devel zlib-devel libxml2-devel libxslt-devel openssl-devel kernel-devel pcre-devel boost-devel python-devel python-setuptools libpcap-devel
yum install -y wget htop vim lsof lrzsz tcpdump net-tools lsof screen mtr nc nmap zip dos2unix sysstat dstat setuptool system-config-* ntsysv mlocate telnet tree
# selinux off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0
########################################
# install redis
yum install -y tcl gcc
wget http://download.redis.io/releases/redis-4.0.1.tar.gz
tar xzf redis-4.0.1.tar.gz
cd redis-4.0.1
make
make test
make install
cp redis.conf /etc/redis.conf
cd ~
cat > /var/run/redis_6379.pid <<EOF
16379
EOF
# 创建redis服务
cat > /etc/systemd/system/redis-server.service <<EOF
[Unit]
Description=The redis-server Process Manager
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/usr/local/bin/redis-server /etc/redis.conf
ExecReload=/bin/kill -USR2
ExecStop=/bin/kill -SIGINT
[Install]
WantedBy=multi-user.target
EOF
# 按业务需求配置redis
i=`expr $r \* 6 / 10 \* 1024 \* 1024 \* 1024`
sed -i "s/# maxmemory <bytes>/maxmemory $i/" /etc/redis.conf #引用变量用双引号
sed -i 's/# maxmemory-policy noeviction/maxmemory-policy volatile-ttl/' /etc/redis.conf
sed -i 's/daemonize no/daemonize yes/' /etc/redis.conf
sed -i 's/timeout 0/timeout 3000/' /etc/redis.conf
sed -i 's/protected-mode yes/protected-mode no/' /etc/redis.conf
sed -i 's/bind 127.0.0.1/#bind 127.0.0.1/' /etc/redis.conf
sed -i 's/save 900 1/# save 900 1/' /etc/redis.conf
sed -i 's/save 300 10/# save 300 10/' /etc/redis.conf
sed -i 's/save 60 10000/# save 60 10000/' /etc/redis.conf
systemctl daemon-reload
systemctl start redis-server.service
systemctl enable redis-server.service
rm -rf redis-4.0.1*
#####################################################
# install rabbitmq
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_10/rabbitmq-server-3.6.10-1.el7.noarch.rpm
rpm -ivh rabbitmq-server-3.6.10-1.el7.noarch.rpm
yum makecache
yum install -y rabbitmq-server
systemctl start rabbitmq-server
systemctl enable rabbitmq-server
rabbitmq-plugins enable rabbitmq_management #开启管理界面
systemctl restart rabbitmq-server
rm -rf rabbitmq-server*
rm -rf esl-erlang*
###################################################
# install mysql
rpm -ivh http://repo.mysql.com/mysql57-community-release-el7-9.noarch.rpm
yum install -y mysql-server
systemctl start mysqld
# 初始化数据库
mypasswd=`grep "password" /var/log/mysqld.log |awk {'print $11'}`
mysqladmin -uroot -p$mypasswd password $newpasswd
echo "max_allowed_packet = 20M" >> /etc/my.cnf
echo "max_connections = 32000" >> /etc/my.cnf
systemctl restart mysqld
systemctl enable mysqld
# 创建、导入数据库
mysql -uroot -p$newpasswd -e "create database TravelCache" >/dev/null 2>&1
wget http://101.78.141.107/TravelCache.sql
source TravelCache.sql
mysql -uroot -p$newpasswd TravelCache < TravelCache.sql
# 设置远程访问mysql(这里可以直接引用变量,不用加\)
mysql -uroot -p$newpasswd -e "Grant all privileges on *.* to 'root'@'%' identified by '$newpasswd' with grant option" >/dev/null 2>&1
mysql -uroot -p$newpasswd -e "flush privileges" >/dev/null 2>&1
# 设置清理脚本
mkdir /usr/share/mysql/task
mkdir /usr/share/mysql/task/Task_log
cat > /usr/share/mysql/task/mysql.sh <<EOF
#!/bin/bash
MYUSER="root"
MYPASS="$newpasswd"
MYIP="localhost"
MYPORT="3306"
MYSQL_CMD="/usr/bin/mysql -u\$MYUSER -p\$MYPASS --host=\$MYIP --port=\$MYPORT "
DATA_PATH=/usr/share/mysql/task/Task_log
LOG_FILE=\${DATA_PATH}/mysqllogs3306_\`date +%F-%H:%M:%S\`.log
\$MYSQL_CMD -e "delete from TravelCache.rediscache where TIMESTAMPDIFF(Minute,ADDTIME,now())>180 or expire<now()" >> \$LOG_FILE
\$MYSQL_CMD -e "optimize table TravelCache.rediscache" >/dev/null 2>&1
find /usr/share/mysql -mtime +2 -type f -name 'mysql-bin.00*' -exec rm -f {} \;
EOF
cat > /usr/share/mysql/task/delete_log.sh <<EOF
#!/bin/bash
logdir="/usr/share/mysql/task/Task_log"
find $logdir -type f -mtime 7 | xargs rm -f
EOF
chmod +x /usr/share/mysql/task/*
# 设置crontaab
#备份旧的crontab内容
crontab -l >/tmp/crontab.bak
#把要加入的命令写入备份的文件后面
echo "*/40 * * * * /usr/share/mysql/task/mysql.sh >/dev/null 2>&1" >>/tmp/crontab.bak
echo "00 01 * * * /usr/share/mysql/task/delete_log.sh >/dev/null 2>&1" >>/tmp/crontab.bak
#导入文件
crontab /tmp/crontab.bak
rm -f /tmp/crontab.bak
########################################################
# 安装配置 zabbix-agent
rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
yum install -y zabbix-get zabbix-agent zabbix-sender
systemctl stop zabbix-agent
sed -i 's/LogFileSize=0/LogFileSize=1/' /etc/zabbix/zabbix_agentd.conf
sed -i "s/Server=127.0.0.1/Server=$zabbixip/" /etc/zabbix/zabbix_agentd.conf
sed -i "s/ServerActive=127.0.0.1/ServerActive=$zabbixip/" /etc/zabbix/zabbix_agentd.conf
sed -i 's/Hostname=Zabbix server/Hostname=system.hostname/' /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent
systemctl enable zabbix-agent
echo "################### Install Finish ########################"
echo
echo -e "IP:\033[36m`ifconfig |grep inet |awk '{print $2}'|cut -d: -f2 |grep -v '127.0.0.1' |grep -v '192.168.122.1'`\033[0m"
echo
echo -e "
mysql:
port: \033[36m3306\033[0m
user: \033[36mroot\033[0m password:\033[36m $newpasswd\033[0m
\n
redis:
port:\033[36m 6379\033[0m
\n
RabbitMQ:
port:\033[36m 15672\033[0m
user:\033[36m guset\033[0m password:\033[36m guset \033[0m\n"
echo "##########################################################"
Nginx负载均衡配置文件
这里要注意,如果server写的是IP,那么监听的端口不同,这样是可以负载的。
监听的端口不同,server也是不同的网址,这样是可以负载的。
如果监听的端口相同,server应该是不同的网址(不能是相同的网址或IP),这样也是可以负载的。
其他情况都无法负载,会导致无法访问的情况。
同时注意路由器端口映射有没有指向了某个主机造成端口不可用。
#user nobody;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
use epoll;
worker_connections 8096;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 600;
gzip on;
proxy_cache_path /usr/local/www/cache levels=1:2 keys_zone=webserver:40m max_size=5g;
limit_req_zone $binary_remote_addr zone=one:80m rate=40r/s;
#include /usr/local/nginx/conf/vhosts/APIS.conf;
##########################################################################################
upstream Skyscanner {
#server 172.16.16.83:88;
server 172.16.16.114:88;
}
server{
listen 88;
server_name skyscanner.api.wefly.com.hk;
index index.jsp index.html index.hem;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
location / {
proxy_pass http://Skyscanner;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
######################################################################################
upstream DuckDuck {
#server 172.16.16.83:88;
server 172.16.16.114:88;
}
server{
listen 88;
server_name duckduck.api.wefly.com.hk;
index index.jsp index.html index.hem;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
location / {
proxy_pass http://Skyscanner;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
#################################################################################
upstream WebApi {
#server 172.16.16.82:8081 weight=5;
server 172.16.16.87:8081 weight=5;
}
server{
listen 8081;
server_name 172.16.16.71;
index index.jsp index.html index.hem;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
location / {
proxy_pass http://WebApi;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
limit_req zone=one burst=10;
}
}
##############################################################################
upstream stagingWefly {
server 172.16.16.85:90;
}
server{
listen 80;
server_name staging.wefly.com.hk;
index index.jsp index.html index.hem;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
location / {
proxy_pass http://stagingWefly;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
##############################################################################
upstream web {
ip_hash;
#server 172.16.16.80:81 weight=5;
server 172.16.16.85:81;
}
server{
listen 80;
server_name www.wefly.com.hk www2.wefly.com.hk wefly.com.hk;
index index.jsp index.html index.hem;
large_client_header_buffers 4 16k;
client_max_body_size 300m;
client_body_buffer_size 128k;
proxy_connect_timeout 120;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
location / {
proxy_pass http://web;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ .*\.(gif|jpg|jpeg|bmp|png|js|css|swf)?$ {
proxy_cache webserver;
proxy_cache_valid 200 304 1h;
proxy_cache_valid 301 302 1m;
proxy_cache_valid any 1m;
proxy_cache_key $host$uri$is_args$args;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://web;
add_header X-Via $server_addr;
add_header X-Cache $upstream_cache_status;
}
location /nginx_status {
stub_status on;
access_log on;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
######################################################################
upstream APIS {
#server 172.16.16.82:8080 weight=5;
server 172.16.16.87:8080 weight=5;
}
server{
listen 8080;
server_name 172.16.16.71;
index index.jsp index.html index.hem;
large_client_header_buffers 4 16k;
client_max_body_size 300m;
client_body_buffer_size 128k;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
location / {
proxy_pass http://APIS;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
limit_req zone=one burst=50;
}
}
###################################################################
upstream APIS_Mobile {
server 172.16.16.87:9099 weight=1;
}
server{
listen 9099;
server_name 172.16.16.71;
index index.jsp index.html index.hem;
large_client_header_buffers 4 16k;
client_max_body_size 300m;
client_body_buffer_size 128k;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
location / {
proxy_pass http://APIS_Mobile;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
limit_req zone=one burst=50;
}
}
###################################################################
upstream Markup {
ip_hash;
#server 172.16.16.82:8082 weight=5;
server 172.16.16.87:8082 weight=5;
}
server{
listen 8082;
server_name 172.16.16.71;
index index.jsp index.html index.hem;
large_client_header_buffers 4 16k;
client_max_body_size 300m;
client_body_buffer_size 128k;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
location / {
proxy_pass http://Markup;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
###########################################################################
upstream Uapi_Object {
#server 172.16.16.82:8083;
server 172.16.16.87:8083;
}
server{
listen 8083;
server_name 172.16.16.71;
index index.jsp index.html index.hem;
large_client_header_buffers 4 16k;
client_max_body_size 300m;
client_body_buffer_size 128k;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
location / {
proxy_pass http://Uapi_Object;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 99;
server_name localhost;
location /stub_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
}
}
TSL问题
编辑组策略:gpedit.msc
http://schwenksolutions.com/technology-blog/
评论区