网站服务器Apache启动错误提示:The requested URL / was not found on this server

时间:2019-05-01 14:22:51

网站服务器Apache启动错误提示:The requested URL / was not found on this server

The requested URL was not found on this server.

请求Uniform Resource Locator ,在Internet的程序上用于指定信息位置的表示方法(URL)没有被找到这项服务.

对于此种问题,遇到过好多次,在经历多次后总结经验如下

因为是新搭建的环境,apache的重写未开启,开启重写后,问题解决,方法如下:

apache 打开 httpd.conf 文件 找到

#LoadModule rewrite_module modules/mod_rewrite.so

去掉前面的#号

找到

<Directory "E:/online/webs/Apache24/htdocs">

Options Indexes FollowSymLinks

AllowOverride None =>改为 AllowOverride All

Order allow,deny

Allow from all

</Directory>


二、解决方法:检查Apache下的httpd.conf 的DocumentRoot 和Directory 的路径是的正确, 

若路径正确;则查看httpd:conf 下的Include conf/extra/httpd-vhosts.conf 

将Include conf/extra/httpd-vhosts.conf改为#Include conf/extra/httpd-vhosts.conf ;

重启服务访问即可;

提示把Apache的配置文件httpd.conf中的Include conf/extra/httpd-vhosts.conf改为#Include conf/extra/httpd-vhosts.conf,顿时恍然大悟,肯定是因为之前我配置了“wampserver的本地虚拟服务器环境”,而现在我想把本地项目访问从虚拟环境访问改为用http:// localhost/这种方式访问,所以导致服务器找不到用户请求的URL,最后,按照上面的提示更改后重启wampserver的Apache服务,发现wampserver的Apache本地访问成功了!!!

猜你喜欢

版权所有:2019-2021 无双建设   网站地图