子目录中的Wordpress安装给出了404s

时间:2018-03-10 18:19:15

标签: php wordpress apache

我在EC2实例上安装了干净版的Wordpress,PHP和Apache。我的文档根目录是/var/www,Wordpress在/var/www/wordpress中未加标记。如果我得到http://www.example.com/wordpress,我会得到:

$ wget https://www.example.com/wordpress/
--2018-03-10 18:05:21--  https://www.example.com/wordpress/
Resolving www.example.com (www.example.com)... IP, IP
Connecting to www.example.com 
(www.example.com)|IP|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-03-10 18:05:22 ERROR 404: Not Found.

但是,如果我将index.php中的现有代码注释掉并放入echo('foo');,我会得到:

$ curl https://www.example.com/wordpress/
foo

所以显然它正在加载index.php很好,我猜它在Wordpress包含堆栈中找不到一些“更深”的文件?但我没有在错误中看到任何内容,也没有访问有关它的日志:

172.31.81.199 - - [10/Mar/2018:18:04:54 +0000] "GET / HTTP/1.1" 200 177 "-" "ELB-HealthChecker/2.0"
172.31.42.132 - - [10/Mar/2018:18:05:06 +0000] "GET /blog/feed/atom/ HTTP/1.1" 404 293 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.432 Safari/537.36"
172.31.81.199 - - [10/Mar/2018:18:05:21 +0000] "GET /wordpress/ HTTP/1.1" 404 - "-" "Wget/1.18 (linux-gnu)"
172.31.42.132 - - [10/Mar/2018:18:05:24 +0000] "GET / HTTP/1.1" 200 177 "-" "ELB-HealthChecker/2.0"

关于如何调试这个的任何想法?

0 个答案:

没有答案