这是配置:
\nindex index.html;\nlocation / {\n try_files $uri $uri/ = 404;\n}\nRun Code Online (Sandbox Code Playgroud)\n我在 http://localhost/path/a/ 发出请求。我假设这是 URI,因此在 $uri 阶段,try_files 将查看 /path/a/ 并提供 index.html(如果有)。
\n我从文档中读到It is possible to check directory\xe2\x80\x99s existence by specifying a slash at the end of a name, e.g. \xe2\x80\x9c$uri/\xe2\x80\x9d.但这对我来说没有任何意义。
nginx ×1