搞定!(之前用的2.x的版本这样用总有这样那样的错误,主要路径配置问题!不能实现)终于弄完..说多都是泪!
三、配置虚拟主机
1、配置appche“httpd.conf”文件中查找:Includeconf/extra/httpd-vhosts.conf,去掉前面的注释#
2、配置httpd-vhosts.conf 文件
打开目录Apache的安装目录/conf/extra/, 找到 httpd-vhosts.conf 文件;
ServerName www.bbs.com
DocumentRoot D:/wamp64/www/bbs
<Directory "D:/wamp64/www/bbs">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.b.com
DocumentRoot D:/wamp64/www/demo2
<Directory "D:/wamp64/www/demo2">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
(用的2.x的版本遇到的问题)
一、wamp安装
一路安装到D:\wamp
打开浏览器发现 frobidden错误
Forbidden
You don't have permission to access / on this server.
打开apche下面配置文件
打开http.conf
D:\wamp\bin\apache\Apache2.2.21\conf
找一个有关目录的配置文件DocumentRoot "D:/wamp/www/" 下面添加
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
Allow from 127.0.0.1
Allow from localhost
</Directory>Allow from 127.0.0.1
Allow from localhost
</Directory>
二、打开phpmyadmin
也出现这个问题
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
解决办法
打开配置文件D:\wamp\alias\phpmyadmin.conf
修改<Directory "D:/wamp/apps/phpmyadmin3.4.5/">中的配置文件
<Directory "D:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
#Deny from all
#Allow from 127.0.0.1
Allow from all</Directory>