大家好,我要配一个nginx 静态路径,把/app文件夹设定为root,在app文件夹下有很多服务,1,2,3,4,5.... 每个服务下都有一个index.html 我希望访问每个服务的文件夹就可以自动读取index.html,我当前的配置无法做到,只能自己输入index.html,如 xxx.com/1/index.html,(我希望xxx.com/1就能自动读取index.html)。我的配置如下:
server {
listen 80;
location ~ \.(js|css|png|jpg|gif|html|woff|ttf) {
root /app;
index index.html;
}
}
求如何实现,谢谢