尝试在我的Windows 7计算机上安装XAMPP时遇到问题。基本上当我启动apache和mysql时,xampp索引页(localhost)工作正常。在我的本地文件目录中,我试过这个:
在: C:\ XAMPP \ htdocs中 我创建了一个名为'test.php'的文件,然后在Web浏览器中我尝试了localhost / test.php 我得到'找不到对象!'错误。
我试过创建一个名为的目录: C:\ XAMPP \ htdocs中\接力 然后添加了一个索引文件: C:\ XAMPP \ htdocs中\接力\的index.php
并且在Web浏览器中尝试了'localhost / oop'和'localhost / oop / index.php'但是收到了同样的错误。
我的错误日志是:
[Sat Apr 19 22:09:09.742135 2014] [ssl:warn] [pid 3508:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:10.248164 2014] [ssl:warn] [pid 3508:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:10.346169 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00455: Apache/2.4.9 (Win32) OpenSSL/0.9.8y PHP/5.4.27 configured -- resuming normal operations
[Sat Apr 19 22:09:10.346169 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 11:15:11
[Sat Apr 19 22:09:10.346169 2014] [core:notice] [pid 3508:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Apr 19 22:09:10.365170 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00418: Parent: Created child process 2692
[Sat Apr 19 22:09:11.325225 2014] [ssl:warn] [pid 2692:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:11.687246 2014] [ssl:warn] [pid 2692:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:11.734249 2014] [mpm_winnt:notice] [pid 2692:tid 272] AH00354: Child: Starting 150 worker threads.
[Sat Apr 19 22:14:57.151005 2014] [ssl:warn] [pid 5348:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:57.207008 2014] [core:warn] [pid 5348:tid 260] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Apr 19 22:14:57.461023 2014] [ssl:warn] [pid 5348:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:57.514026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00455: Apache/2.4.9 (Win32) OpenSSL/0.9.8y PHP/5.4.27 configured -- resuming normal operations
[Sat Apr 19 22:14:57.514026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 11:15:11
[Sat Apr 19 22:14:57.514026 2014] [core:notice] [pid 5348:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Apr 19 22:14:57.517026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00418: Parent: Created child process 2356
[Sat Apr 19 22:14:58.340073 2014] [ssl:warn] [pid 2356:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:58.659092 2014] [ssl:warn] [pid 2356:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:58.717095 2014] [mpm_winnt:notice] [pid 2356:tid 272] AH00354: Child: Starting 150 worker threads.
我尝试过的其他事情:
在httpd.conf文件中,我将'Listen 80'更改为'Listen 1337'(Skype也已关闭),但它无法解决任何问题。
我也看了一下Documentroot,看起来很好:
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
我试过了:
DocumentRoot "C:\xampp\htdocs"
<Directory "C:\xampp\htdocs">
但同样的问题。
我是新手使用XAMPP并对其进行配置,因此非常感谢任何帮助。
感谢。
答案 0 :(得分:0)
尝试将test.php文件放在htdocs中的文件夹(eg.demo)中,然后尝试浏览
http://localhost/demo/test.php
希望这会对你有所帮助。
答案 1 :(得分:0)
查看/etc/httpd.conf文件并检查是否已激活虚拟主机。
我已将其激活,请检查您的etc / extra / httpd-vhosts.conf文件。您可能已经设置了VirtualHost。