apache版本以2.4为例
1、修改httpd.conf
把下面第二行的#去掉,启动虚拟主机配置
# Virtual hosts # Include conf/extra/httpd-vhosts.conf
2、配置httpd-vhost.conf
这里使用了8081端口,配置了两个虚拟主机,DocumentRoot不能含有中文目录
立即学习“PHP免费学习笔记(深入)”;
cqcms通用企业建站介绍 cqcms蓝色通用企业网站源码(带手机端)后台非常简单,一个后台同时管理PC和wap。把图片和文字稍加修改,就可以使用。适合任何企业网站 安装步骤: 1、下载文件,并且解压到网站的根目录,配置好apache/IIS虚拟主机以及伪静态;2、安装网址http://localhost/(localhost为您网址地址)3、网站后台入口 http://localhost/ad
ServerName localhost DirectoryIndex index.php DocumentRoot "D:\Work\php\Apache24\htdocs" Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all ServerName www.aa.com DirectoryIndex index.php DocumentRoot "E:\php\PhpProjectBase" Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all
3、etc/hosts配置
127.0.0.1 localhost127.0.0.1 www.aa.com
4、重启Apache服务
如果此时虚拟主机仍不能访问,配置httpd.conf中以下项
AllowOverride none #Require all denied










