/ -> www.abc.com
/en -> www.abc.com/en
/hc -> health check 健康检查
setup your conf.d and logs dir
then,
default.conf -> /conf.d/default.conf
g2g now
#!/bin/bash
pwd=`pwd`
docker run --name nginx \
-p 80:80 \
-p 443:443 \
-v ${pwd}/nginx.conf:/etc/nginx/nginx.conf:ro \
-v ${pwd}/conf.d:/etc/nginx/conf.d:ro \
-v ${pwd}/logs:/var/log/nginx:rw \
--restart=unless-stopped \
-m 1G --memory-swap -1 \
--cpuset-cpus="0,1" \
-d nginx:1.17-alpine
log_format main '$http_x_forwarded_for - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent"' ;
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :`
do
dig txt $LINE +short
done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n