我在 var/www/html/test
中创建了一个文件夹.该文件夹包含一些 PHP 文件。我正在尝试访问像 http://example.com/test/test 这样的文件. PHP 显示以下错误:
404 Not Found nginx/1.10.3 (Ubuntu)
谁能帮我解决这个问题?
最佳答案
您只有一个文件夹:test
.但是,在您的 URL 上,您正尝试访问 test
另一个文件夹中的 test
文件夹:test/test
.
所以,因为文件夹 test
里面 test
不存在,服务器会抛出 404 错误(没有这样的文件夹)。
如果您调用:http://example.com/test/test
你真正在做的是调用文件/test/test/index.html
, /test/test/index.htm
或 /test/test/index.php
.
关于php - 404 未找到 nginx/1.10.3 (Ubuntu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45792502/