Nginx发布项目刷新 404 简单有效
更改nginx.conf

location / {
root html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
autoindex on;
}

docker配置
把配置文件挂载在宿主机。
volumes:
- /usr/local/docker-nginx/nginx.conf:/etc/nginx/nginx.conf
- /usr/local/docker-nginx/log:/var/log/nginx
- /usr/local/docker-nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80

相关文章:

  • 2021-08-14
  • 2022-01-16
  • 2022-12-23
  • 2021-06-09
  • 2022-12-23
  • 2021-12-14
  • 2022-02-19
猜你喜欢
  • 2022-12-23
  • 2021-10-08
  • 2021-12-04
  • 2022-12-23
  • 2022-01-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案