docker部署nginx小记

docker pull nginx
 
docker run -p 80:80 --name mynginx -v $PWD/www:/www  -v $PWD/logs:/wwwlogs  -v $PWD/conf:/etc/nginx/conf.d -d nginx 
docker run -p 81:80 --name mynginx -v $PWD/www:/www  -v $PWD/logs:/wwwlogs  -v $PWD/conf:/etc/nginx/conf.d -d nginx 

Nginx简单配置:

server {

        listen 80;

        #root /www;         #index index.html index.htm;

        server_name hk.zwc.cn;        

       location  / {

              proxy_pass http://150.107.3.92:8888;        

       }

}

posted @ 2018-03-01 23:02  China Soft  阅读(72)  评论(0编辑  收藏  举报