Wamp安装问题:#Includeconf/extra/httpd-vhosts.conf 去掉#无法访问问题
2016-12-19 17:31
441 查看
一直在用Qampp或者phpstudy,因公司需要换了wamp(wamp2.5),
发现在 D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 里面
#Includeconf/extra/httpd-vhosts.conf 去掉#无法访问localhost,报403错误。
在网上看很多教程是在这个目录下搜索到
<Directory />
AllowOverride none
Require all denied
</Directory>
把denied 改成 granted 但我用了不好使,
我的解决方法是:
打开D:\wamp\bin\apache\apache2.4.9\conf\extra\ httpd-vhosts文件,配置好localhost虚拟主机,参照httpd-vhosts文件中实例,修改成如下:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\wamp\www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
修改配置如下:
DocumentRoot修改为本地wamp环境下的www目录(如:D:\wamp\www)
ServerName改为localhost
然后访问localhost问题解决了,感谢 CSDN可克技术的博客帮我解决问题;
我添加的域名:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\web"
ServerName www.web.com
ServerAlias www.web.com
<Directory "D:/web">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
发现在 D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 里面
#Includeconf/extra/httpd-vhosts.conf 去掉#无法访问localhost,报403错误。
在网上看很多教程是在这个目录下搜索到
<Directory />
AllowOverride none
Require all denied
</Directory>
把denied 改成 granted 但我用了不好使,
我的解决方法是:
打开D:\wamp\bin\apache\apache2.4.9\conf\extra\ httpd-vhosts文件,配置好localhost虚拟主机,参照httpd-vhosts文件中实例,修改成如下:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\wamp\www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
修改配置如下:
DocumentRoot修改为本地wamp环境下的www目录(如:D:\wamp\www)
ServerName改为localhost
然后访问localhost问题解决了,感谢 CSDN可克技术的博客帮我解决问题;
我添加的域名:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\web"
ServerName www.web.com
ServerAlias www.web.com
<Directory "D:/web">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
相关文章推荐
- apache打开Include conf/extra/httpd-vhosts.conf,就无法起动的解决办法(转自雨中奔跑的博客)
- apache配置文件里#include conf/extra/httpd-bhosts.conf 打开无法启动apache的问题
- 关于virtualBox中最小化安装CentOS7系统,更改httpd.conf中的DocumentRoot之后访问出现Forbidden的问题
- #Virtual hosts #Include conf/extra/httpd-vhosts.conf 开启就不能启动apache
- wamp3.06版本的80端口的配置 1 找到 C:\wamp64\bin\apache\apache2.4.23\conf\extra 目录 打开 httpd-vhosts.conf 文件复制下
- PHP安装wamp设置虚拟目录后,无法访问localhost问题
- PHP安装wamp设置虚拟目录后,无法访问localhost问题
- httpd.conf中加入LoadModule后无法启动的问题。
- asp.net 2安装遇到问题的解决(由于无法创建应用程序域,因此未能执行请求。错误: 0x80070005 拒绝访问)
- 关于win8下WAMP 无法用localhost访问的问题
- wamp无法远程访问的问题
- 安装wamp时出现httpd.exe无法找到组件MSVCR100.dll的解决办法
- Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因
- 解决ASP.NET安装后无法访问Oracle数据库问题
- 安装Microsoft Visual Studio 2008 SP1时出现无法访问Windows Installer服务的问题
- 安装wamp时出现httpd.exe无法找到组件MSVCR100.dll的解决办法
- 同时安装Vmware Player与VirtualBox 虚拟机无法访问网络问题解决
- apache/httpd 无法访问软连接问题
- 关于wamp安装后无法载入mysqli问题
- oracle安装后的问题:共享库Libsqlplus.so 无法访问