windows下Apache配置多个站点
1. httpd.conf 找到以下两行去掉注释:
# Include conf/extra/httpd-vhosts.conf
# LoadModule vhost_alias_module modules/mod_vhost_alias.so
2. httpd-vhosts.conf 文件,添加多个站点设置:
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "D:/xampp/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
##</VirtualHost>
根据样例,去掉注释,除DocumentRoot外,dummy-host2.example.com改为自己需要的主机名,例如,www.tp5.com
<VirtualHost *:80>
ServerAdmin webmaster@www.tp5.com
DocumentRoot "D:/xampp/htdocs/tp5/public"
ServerName www.tp5.com
ErrorLog "logs/www.tp5.com-error.log"
CustomLog "logs/www.tp5.com-access.log" common
</VirtualHost>
DocumentRoot的值改为站点对应的目录
3. host文件添加域名解析,例如:127.0.0.1 www.test.com
4. 重启Apache.
windows下Apache配置多个站点的更多相关文章
- windows下apache配置https
1.下载带有openSSL的apache安装包,我下载的为apache_2.2.11-win32-x86-openssl-0.9.8i.msi,安装后确认一下bin路径下的openssl.exe,ss ...
- windows下Apache配置SSL安全连接
什么是SSL? SSL(Secure Socket Layer): 是为Http传输提供安全的协议,通过证书认证来确保客户端和网站服务器之间的数据是安全.Open SSL下载地址:http://www ...
- windows下apache配置ssl(https)服务器
SSl是为Http传输提供安全的协议,通过证书认证来确保客户端和网站服务器之间的数据是安全, 可以通过apache自带的openssl进行配置: 步骤如下: 1.安装有openssl模板的apache ...
- windows下apache配置虚拟主机
因为有多个laravel项目需要配置根目录到public下面,所以要配置多个虚拟主机 方法一:添加端口号 第一步:进入apache的目录 Apache24\conf 找到 httpd.conf 文件, ...
- Windows下Apache配置域名
1.打开httpd.conf 找到“Include conf/extra/httpd-vhosts.conf”这一行,取消前面的#号注释并保存 2.修改httpd-vhosts.conf文件 进入ap ...
- Windows下Apache配置多域名项目
<VirtualHost www.a.com:80> DocumentRoot "C:\object\a\web" ServerName http://www.a.co ...
- Windows 下apache https配置(phpstudy)
1.首先获取证书,https://www.pianyissl.com/ 免费三个月的 或者 自己生成私钥.证书,然后应用到apache中. http://blog.sina.com.cn/s/blo ...
- Windows下Nginx Virtual Host多站点配置详解
Windows下Nginx Virtual Host多站点配置详解 此教程适用于Windows系统已经配置好Nginx+Php+Mysql环境的同学. 如果您还未搭建WNMP环境,请查看 window ...
- Windows下Apache+mod_python+Django配置
Windows下Apache+mod_python+Django配置 Apache 首先要安装Apache,我安装的版本是2.2.*: Python python肯定是要安装的,我安装的版本是2.5的 ...
随机推荐
- IDEAL启动项目的时候报java.lang.NoClassDefFoundError: javax/servlet/Filter错误
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring- ...
- 提高GitHub下载速度
修改/etc/hosts 加上 151.101.72.249 GitHub.global.ssl.fastly.net 192.30.253.112 github.com
- day52类型转换 运算符 流程控制
0.复习 1.导入 <div id="div1" onclick="this.style.color = 'red';">12345</div ...
- Ubuntu16.04 藍牙連上,但是聲音裏面找不到設備
解決辦法: 1. sudo apt-get install blueman bluez* 2. sudo vim /etc/pulse/default.pa 注釋掉下面的代碼: #.ifexists ...
- Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException
Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. M ...
- iOS.ObjC.__attribute__-directives
__attribute__ Directives Reference 1. __attribute__ directives in Objective-C (AAAA+) (Read Again) h ...
- [Javasript] 同时实现单击和双击事件
在同一个元素上同时绑定单击和双击事件: JavaScript <script type="text/javascript"> var timer = 0; var de ...
- memcache集群
实现memcache集群 一:memcache本身没有redis锁具备的数据持久化功能,比如RDB和AOF都没有,但是可以通过做集群的方式,让各memcache的数据进行同步,实现数据的一致性,即 ...
- js url参数解析获取
function get_url_parm_list(str){ var params=str.substr(str.indexOf('?')+1); var param_list=[]; while ...
- sublime text3中sass编译后保存到指定文件夹
第一步: tools->builde system->new build system 第二步: 粘贴如下代码到新建文档中: { "cmd": ["sass& ...