线上Nginx镜像构建及容器使用(2)

location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass ;
}

}


4.2 日志文件目录:mdkir -p /opt/nginx/logs

5.启动容器


参考:docker run -d --name=nginx02 -p 9999:80 -v /opt/nginx/conf/nginx.conf:/usr/local/nginx/conf/nginx.conf -v /opt/nginx/conf/vhost/:/usr/local/nginx/conf/vhost/ -v /opt/nginx/logs/:/usr/local/nginx/logs/ xx.xx.xx.xx/library/nginx:v2

Linux公社的RSS地址https://www.linuxidc.com/rssFeed.aspx

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a0e17ba3a9328d4e2e4b1f4eb3ebcdaf.html