windwos 下 apache 配置多站点
2017-08-31 13:29
459 查看
apache版本:httpd-2.4.27-x64-vc14
官网下载编译后的即可
然后正常安装
1.host文件里面配置
127.0.0.1 www.aaa.com
127.0.0.1 www.bbb.com
127.0.0.1 www.ccc.com
2.修改配置文件 httpd.conf
DocumentRoot "${SRVROOT}/htdocs"
<Directory "${SRVROOT}/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
修改为
ServerName www.aaa.com:80
DocumentRoot "H:/ApacheWeb"
<Directory "H:/ApacheWeb">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<VirtualHost www.bbb.com:80>
DocumentRoot "H:/ApacheWeb"
<Directory "H:/ApacheWeb">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
我这里文件存放的路径就用了一个H:/ApacheWeb 大家可根据自己情况设置不同的项目所在路径,目录下存放一个index.html静态页
3.重启apache服务
4 访问 www.aaa.com 和 www.bbb.com 即可
官网下载编译后的即可
然后正常安装
1.host文件里面配置
127.0.0.1 www.aaa.com
127.0.0.1 www.bbb.com
127.0.0.1 www.ccc.com
2.修改配置文件 httpd.conf
DocumentRoot "${SRVROOT}/htdocs"
<Directory "${SRVROOT}/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
修改为
ServerName www.aaa.com:80
DocumentRoot "H:/ApacheWeb"
<Directory "H:/ApacheWeb">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<VirtualHost www.bbb.com:80>
DocumentRoot "H:/ApacheWeb"
<Directory "H:/ApacheWeb">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
我这里文件存放的路径就用了一个H:/ApacheWeb 大家可根据自己情况设置不同的项目所在路径,目录下存放一个index.html静态页
3.重启apache服务
4 访问 www.aaa.com 和 www.bbb.com 即可
相关文章推荐
- Windwos 下配置多个Apache服务站点
- Apache本机不同端口多站点配置:httpd-vhosts.conf(转载)
- apache配置多站点
- apache配置多域名多站点记录
- XAMPP3.1.0中Apache2.4.3的多站点配置(vhost/virtual host)
- 配置apache apache服务器如何配置多站点
- Apache之——多虚拟主机多站点配置的两种实现方案
- 在一个Ubuntu系统上配置Apache支持多个站点
- Apache,php关于站点配置及访问
- Apache配置vhost支持多站点
- WAMP下Apache配置httpd-vhosts虚拟主机多站点
- centos7 nginx前端 apache后端 及多站点简单配置
- Apache 本地配置多个虚拟站点
- apache 多站点配置
- apache配置php+多站点+多目录
- 简单 apache php环境 虚拟多站点配置
- APACHE 多站点配置方法
- XAMPP集成环境下apache配置多端口多站点访问
- PHP学习之[第02讲]PHP5.4 Apache Mysql 搭配与多站点配置详解
- Linux环境下Apache配置多个虚拟主机挂载多站点同时运行