nginx匹配所有请求路径显示index.html页面

server {  
    listen 80;  
    server_name example.com;  # 替换为你的域名  
  
    root /path/to/your/root;  # 替换为你的站点目录  
  
    location / {  
        try_files $uri $uri/ /index.html;  
    }  
}

 

posted @ 2024-01-04 15:02  吃吃吃大王  阅读(258)  评论(0)    收藏  举报