![Ubuntu 服务器在浏览器中不显示任何网页](https://linux22.com/image/653800/Ubuntu%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%9C%A8%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%AD%E4%B8%8D%E6%98%BE%E7%A4%BA%E4%BB%BB%E4%BD%95%E7%BD%91%E9%A1%B5.png)
最初我在 ubuntu 上安装 wordpress,它不显示 wordpress 安装页面,所以我将它从 var/www/html 中取出并意识到 ubuntu 不显示任何网页,包括最初在 var/www/html 中的 index.html。它只是显示一个空白页。
我查看了主机文件,它指向 var/www/html。我已 curl var/www/html,那里有 html 文件。
access.log 显示:
127.0.0.1 - - [10/Mar/2015:16:01:46 -0400] "GET / HTTP/1.1" 200 11764 "-" "curl/7.35.0" 127.0.0.1 - - [10/Mar/2015:16:03:23 -0400] "GET / HTTP/1.1" 200 11764 "-" "curl/7.35.0" 127.0.0.1 - - [10/Mar/2015:16:27:05 -0400] "GET / HTTP/1.1" 200 11764 "-" "curl/7.35.0" 127.0.0.1 - - [10/Mar/2015:16:34:44 -0400] "GET / HTTP/1.1" 200 11764 "-" "curl/7.35.0"
error.log 文件显示:
[Tue Mar 10 17:30:54.378078 2015] [core:notice] [pid 1557:tid 140692943787904] AH00094: Command line: '/usr/sbin/apache2' [Tue Mar 10 17:31:34.564745 2015] [mpm_event:notice] [pid 1557:tid 140692943787904] AH00491: caught SIGTERM, shutting down [Tue Mar 10 17:32:58.900759 2015] [mpm_event:notice] [pid 1178:tid 140402444928896] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations [Tue Mar 10 17:32:58.910206 2015] [core:notice] [pid 1178:tid 140402444928896] AH00094: Command line: '/usr/sbin/apache2' [Tue Mar 10 17:34:57.716505 2015] [mpm_event:notice] [pid 1178:tid 140402444928896] AH00491: caught SIGTERM, shutting down [Tue Mar 10 17:34:58.788823 2015] [mpm_event:notice] [pid 1545:tid 140609166165888] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations [Tue Mar 10 17:34:58.788932 2015] [core:notice] [pid 1545:tid 140609166165888] AH00094: Command line: '/usr/sbin/apache2' [Tue Mar 10 17:38:38.658636 2015] [mpm_event:notice] [pid 1545:tid 140609166165888] AH00491: caught SIGTERM, shutting down [Tue Mar 10 17:38:39.729666 2015] [mpm_event:notice] [pid 1656:tid 140483257968512] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations [Tue Mar 10 17:38:39.729781 2015] [core:notice] [pid 1656:tid 140483257968512] AH00094: Command line: '/usr/sbin/apache2'
有谁知道这是什么原因造成的吗?
谢谢。
答案1
重新安装 Apache 和 PHP、Wordpress 及所有依赖项
- 确保您的主机名不冲突
- 确保你的站点可用的 conf 文件被 Apache 加载并且是正确的(我听说在文件末尾添加“.conf”可以帮助 Apache 找到它们)
- 确保 Apache PID 位于正确的位置 / Apache 知道在哪里找到它(/var/run/apache2.pid)
- 确保您没有受到匿名者的拒绝服务攻击;)
希望有帮助