创建网站nginx配置问题

我在尝试给我网站新建一个子域名网站时,配置nginx遇到了问题,我想将我的静态文件指定到某个路径下,但是遇到了问题
1Panel 版本:社区版1.10.5-lts
操作系统:ubuntu
关键截图:




日志:
没有添加

    # 前端路由 - 使用精确匹配避免循环
    location = / {
        try_files /index.html =404;
    }
    
    location / {
        try_files $uri $uri/ @fallback;
    }
    
    location @fallback {
        rewrite ^.*$ /index.html last;
    }

时报下面的错误:
==> error.log <==
2025/10/16 10:59:15 [error] 317#317: *46965965 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 219.144.137.232, server: tools.hahaguai.cn, request: “GET / HTTP/1.1”, host: “tools.hahaguai.cn
添加了之后 页面404,access.log:
127.0.0.1 - - [16/Oct/2025:11:03:24 +0800] “GET / HTTP/1.1” 404 150 “-” “curl/7.58.0”

容器里面的路径 和 宿主机的路径 不同
不能直接使用宿主机路径


我还原了配置文件内容
并且将对应项目index.html拷贝到了/opt/1panel/apps/openresty/openresty/www/sites/tools.hahaguai.cn/index下

但还是得到了404的响应

请问我该如何修改解决呢? 文档关于这块的配置我没有找到,如果有,烦请发我借阅一下

最好用这个路径 然后把你的文件放在

/opt/1panel/apps/openresty/openresty/www/sites/tools.hahaguai.cn 下面