nginx配置
nginx docker-compose.yml
server {
listen 80;
server_name localhost;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
#解决vue history方式刷新浏览器URL页面404问题
try_files $uri $uri/ /index.html;
}
}
nginx docker-compose.yml
version: "3"
services:
web:
image: nginx
container_name: nginx
volumes:
- ./conf.d:/etc/nginx/conf.d
- ./html:/usr/share/nginx/html
ports:
- 80:80
版权申明:本文为博主原创文章,未经博主允许不得转载。
https://www.leftso.com/blog/934.html
时效提示:本文最后更新于【 2021-12-14 11:09:14 】,某些文章具有时效性,若有错误或已失效,请在下方留言。
时效提示:本文最后更新于【 2021-12-14 11:09:14 】,某些文章具有时效性,若有错误或已失效,请在下方留言。