Go to file
2023-11-17 14:49:01 +09:00
conf.d init 2023-11-17 11:39:00 +09:00
html init 2023-11-17 11:39:00 +09:00
.gitignore init 2023-11-17 11:39:00 +09:00
README.md 修改README.md 2023-11-17 14:49:01 +09:00

NGINX配置宿主机挂载目录

  1. 克隆项目
git clone https://gitea.xiaokeaii.top/yinxiaolong/nginx_proxy.git
  1. 进入目录
cd nginx_proxy
  1. 使用docker创建nginx容器
docker run -p 8080:80 --name nginx_proxy \  # 启动的容器名称
-v `pwd`/conf.d:/etc/nginx/conf.d \         # 映射站点配置文件
-v `pwd`/html:/usr/share/nginx/html \       # 映射站点根目录
-v `pwd`/logs:/var/log/nginx/               # 映射日志目录
 nginx
  1. 访问站点
http://localhost:8088