Windows下配置Apache虚拟机
2015-09-30 16:55
423 查看
WAMP下配置Apache虚拟主机
首先找到三个文件hosts文件,所在目录C:\Windows\System32\drivers\etc\hosts
httpd.conf文件,目录E:..\apache2.4.9\conf
httpd-vhosts.conf文件,所在目录E:..\apache2.4.9\conf\extra
hosts文件配置
配置hosts文件使域名和所访问的IP地址映射。
访问本地,在hosts文件这样配置:127.0.0.1 localhost
在浏览器中输入localhost就可以访问到php了
比如我要在本地访问一个站点, 我给这个站点起个域名为mytest.com。那么在hosts文件就可以这样配置:127.0.0.1 mytest.com
httpd文件配置
去掉virtual hosts下面Include前的#
httpd-vhosts文件配置
<VirtualHost *:80> ServerName mytest.com DocumentRoot "E:/Lee/wamp/www/mytest" <Directory "E:/Lee/wamp/www/mytest"> Options Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all </Directory> </VirtualHost>
本文地址:http://blog.csdn.net/Zelena163/article/details/48830421
相关文章推荐
- (IIS8/8.5/Apache)301域名重定向
- Apache SVN配置
- linux(apache)
- 【手把手教你全文检索】Apache Lucene初探
- 使用Apache Camel处理web service请求的三种方法
- Spark java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCrc32
- apache vhost配置
- BUILD问题“Class not found : Lorg/apache/commons/logging/Log”
- 写得很详细的apache的入门文档
- 安装潮流组合--LAMP+NFS(编译php-fpm模块与apache2.4结合)
- ubuntu14.0(linux) 安装 apache2.4+ 报 apr not found
- 五种开源协议(GPL,LGPL,BSD,MIT,Apache)
- Apache Spark 1.5发布,新特性一览
- Web性能压力测试工具之ApacheBench(ab)详解
- 浏览器、apache的连接超时详解
- Apache性能优化、超时设置,linux 重启apache
- 让时间处理简单化 【第三方扩展类库org.apache.commons.lang.time】
- Apache Maven 入门篇(下)
- Apache Ignite——新一代数据库缓存系统
- Apache Ignite——新一代数据库缓存系统