正向代理
反向代理

1、拉取镜像

docker pull nginx

2、部署容器

  1. docker run -d --name nginx -p 3344:80 \
  2. -v /home/vvvv/docker/volumes/nginx/nginx.conf:/etc/nginx/nginx.conf \
  3. -v /home/vvvv/docker/volumes/nginx/html:/usr/share/nginx/html \
  4. -v /home/vvvv/docker/volumes/nginx/conf.d:/etc/nginx/conf.d --privileged=true nginx

配置文件

  1. 全局配置
  2. events
  3. http {
  4. http 配置
  5. upstream xx {
  6. }
  7. server {
  8. listen 80;
  9. server_name localost
  10. }
  11. }

nginx - 图1