美文网首页
Docker-nginx

Docker-nginx

作者: IT匠心说 | 来源:发表于2021-07-19 10:12 被阅读0次
    • 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;
        }
    
    }
    
    

    相关文章

      网友评论

          本文标题:Docker-nginx

          本文链接:https://www.haomeiwen.com/subject/eqycmltx.html