apache在window上建虚拟目录
来源:互联网 发布:万达电商 淘宝的 编辑:程序博客网 时间:2024/09/21 09:04
你想通过www.aabbccdd.com这样的形式来代替127.0.0.1吗?想通用aa.aabbccdd.com方式来建立二级域名吗?
下面就说一下具体的实现:
一是打开apache的配置文件httpd.conf 找到#Include conf/extra/httpd-vhosts.conf 把前面的#号去掉.
二是在:C:\WINDOWS\system32\drivers\etc 下的hosts文件最后添加一行:127.0.0.1 www.aabbccdd.com 后面那个二级目录同理.
三是:在httpd-vhosts.conf 这个文件里添加以下代码:
<VirtualHost *:80>
DocumentRoot "D:\WWW\website1\wwwroot"
ServerName demo.xxx.com
ServerAlias www.xxx.com #这里是别名,就是绑定多个域名
<Directory "D:\WWW\website1\wwwroot">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.htm index.html index.php
AllowOverride Options FileInfo
Order Deny,Allow
Allow from all
</Directory>
LimitRequestLine 90940
LimitRequestFieldSize 90940
</VirtualHost>
四:重启apache,并收工.
apache2.4及以后的配置方式:
<VirtualHost *:80> ServerName www.demo.com DocumentRoot "/home/www/sites/www" DirectoryIndex index.html index.php <Directory "/home/www/sites/www"> Options -Indexes +FollowSymlinks AllowOverride All Require all granted </Directory> </VirtualHost>
- apache在window上建虚拟目录
- 在Apache服务器创建虚拟目录
- windows上安装Apache虚拟目录设置方法
- window下,Subversion应用在Apache HTTP服务器上(http://)
- window系统下 Apache配置虚拟主机和虚拟目录的方法
- 在Apache中配制多个虚拟目录
- 在ubuntn中apache配制虚拟目录域名
- apache在wamp下配置虚拟主机虚拟目录
- apache 虚拟目录
- 在linux上的tomcat创建虚拟目录
- 在window上旋转
- 在window上部署python Django项目 采用apache+mod_wsgi方案
- 在window上安装mongodb
- 在window上使用python
- 在Window上安装Mysql
- ElasticSerach在window上配置
- apache配置虚拟目录
- apache中设置虚拟目录
- Android 实现大图的滚动显示
- 产品管理:启示录 - 特约客户、产品验证、原型测试
- CIO们正在努力寻找“带上自己的设备(BYOD)”舒适区
- Marks
- Hibernate的generator属性
- apache在window上建虚拟目录
- 手机的通信过程
- 黑马程序员_String类
- 基于角色和用户组的扩展访问控制模型
- 布局文件的引入<include>标签的使用
- OpenStack相关软件下载及说明
- Java中的容器类
- wimax与anroid的困惑
- Asp.net 常用的正则表达式汇集