apache中81端口可以访问,80端口404 not found

来源:互联网 发布:大学生it培训机构 编辑:程序博客网 时间:2024/05/22 01:27

wamp环境中,81端口正常访问,但80却出现404错误。(不是因为其他软件占用80端口造成的,那样的话应该就不是404错误了)

最好的办法是打开appache的错误日志,即logs/apache_error.log

发现了如下错误

[Mon Jun 09 15:40:07.210623 2014] [mpm_winnt:notice] [pid 6540:tid 568] AH00354: Child: Starting 150 worker threads.[Mon Jun 09 15:43:48.322935 2014] [mpm_winnt:notice] [pid 9444:tid 628] AH00422: Parent: Received shutdown signal -- Shutting down the server.[Mon Jun 09 15:43:50.322937 2014] [mpm_winnt:notice] [pid 6540:tid 568] AH00364: Child: All worker threads have exited.Failed loading c:/wamp/bin/php/php53/ext/ZendLoader.dll[Mon Jun 09 15:43:50.352937 2014] [mpm_winnt:notice] [pid 9444:tid 628] AH00430: Parent: Child process 6540 exited successfully.Failed loading c:/wamp/bin/php/php53/ext/ZendLoader.dllAH00112: Warning: DocumentRoot [E:/x/mac/] does not existAH00112: Warning: DocumentRoot [E:/x/mac/vlc/appcheck3/] does not exist[Mon Jun 09 15:43:51.964940 2014] [mpm_winnt:notice] [pid 2124:tid 636] AH00455: Apache/2.4.4 (Win32) PHP/5.3.27 configured -- resuming normal operations[Mon Jun 09 15:43:51.974940 2014] [mpm_winnt:notice] [pid 2124:tid 636] AH00456: Server built: Feb 23 2013 13:07:34[Mon Jun 09 15:43:51.974940 2014] [core:notice] [pid 2124:tid 636] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'[Mon Jun 09 15:43:51.974940 2014] [mpm_winnt:notice] [pid 2124:tid 636] AH00418: Parent: Created child process 4676AH00112: Warning: DocumentRoot [E:/x/mac/] does not existAH00112: Warning: DocumentRoot [E:/x/mac/vlc/appcheck3/] does not existAH00112: Warning: DocumentRoot [E:/x/mac/] does not existAH00112: Warning: DocumentRoot [E:/x/mac/vlc/appcheck3/] does not exist[Mon Jun 09 15:43:53.524942 2014] [mpm_winnt:notice] [pid 4676:tid 604] AH00354: Child: Starting 150 worker threads.

即有很多错误,如e:/x/mac/没找到,于是乎还是要看httpd.conf配置文件

看看有没有包含其他文件include

不出所料,发现这句。

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

又包含了这个文件,内容是:

<VirtualHost *:80>ServerAdmin webmaster@dummy-host.example.comDocumentRoot "E:/php/"ServerName dummy-host.example.comServerAlias www.dummy-host.example.comErrorLog "logs/dummy-host.example.com-error.log"CustomLog "logs/dummy-host.example.com-access.log" common<Directory "E:/php/"> Options Indexes FollowSymLinks AllowOverride AllOrder allow,deny Allow from all </Directory> </VirtualHost>

原来这里占用了80端口。。。。于是乎改之,或删之。。。

apache service restart即可。。






0 0