- run.sh
docker run --name nginx \
-v $PWD/conf.d:/etc/nginx/conf.d/ \
-v $PWD/domain:/domain \
-v $PWD/logs:/logs \
-p 80:80 \
-e TZ="Asia/Shanghai" \
-d \
nginx
- api.conf
server {
listen 80;
server_name api.demo.com;
error_log /logs/api.err;
access_log /logs/api.log;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://0.0.0.0:8080;
}
}
网友评论