wamp2.5 配置站点
2016-01-22 00:30
288 查看
遇到了这样的问题,装好了wamp2.5 ,配置站点时,发现配好的shop111.com可以访问,而localhost不能,加了下面这个就可以了
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wamp/www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
在下面也有讲到。
下面是所有的配置:
httpd.conf 文件(在 E:\wamp\bin\apache\apache2.4.9\conf 我装在了E盘)
打开(即去掉前面的“#”)
Include conf/extra/httpd-vhosts.conf
打开
LoadModule php5_module"E:/wamp/bin/php/php5.5.12/php5apache2_4.dll"
打开
PHPIniDir E:/wamp/bin/php/php5.5.12
httpd-vhosts.conf文件 (E:\wamp\bin\apache\apache2.4.9\conf\extra)
加入下面两部分
这是为了让localhost正常显示:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wamp/www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
这是为了让shop111.com正常显示:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wamp/www/yii1/shop"
ServerName shop111.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
ps: 这两行是主要的
DocumentRoot "E:/wamp/www/yii1/shop" (这是想访问的那个文件夹目录)
ServerName shop111.com (这是网址)
其余的没有改...
hosts文件(位置:C:\Windows\System32\drivers\etc)
加入:
127.0.0.1 shop111.com
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wamp/www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
在下面也有讲到。
下面是所有的配置:
httpd.conf 文件(在 E:\wamp\bin\apache\apache2.4.9\conf 我装在了E盘)
打开(即去掉前面的“#”)
Include conf/extra/httpd-vhosts.conf
打开
LoadModule php5_module"E:/wamp/bin/php/php5.5.12/php5apache2_4.dll"
打开
PHPIniDir E:/wamp/bin/php/php5.5.12
httpd-vhosts.conf文件 (E:\wamp\bin\apache\apache2.4.9\conf\extra)
加入下面两部分
这是为了让localhost正常显示:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wamp/www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
这是为了让shop111.com正常显示:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wamp/www/yii1/shop"
ServerName shop111.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
ps: 这两行是主要的
DocumentRoot "E:/wamp/www/yii1/shop" (这是想访问的那个文件夹目录)
ServerName shop111.com (这是网址)
其余的没有改...
hosts文件(位置:C:\Windows\System32\drivers\etc)
加入:
127.0.0.1 shop111.com
相关文章推荐
- poj3368
- java中的JTable类
- pxssh交换机自动刷限速模板
- 控制台编译C#
- BZOJ1065奥运物流 NOI2008
- django rest_framework--入门教程2
- RaspberryPi和Arduino控制温室温度
- ATan2与ATan的区别
- oracle case when 语句
- 数据结构及算法——带头结点的链式表操作集(C语言)
- ListView常用的优化技巧
- LeetCode 2. Add Two Numbers swift
- iOS中Cookie介绍
- SILTP特征
- 【UE4学习】04——官方教程代码
- log下一次坑爹的疏忽
- Git使用笔记
- LeetCode 01 Two Sum swift
- Flask Web平台搭建
- 构造函数(Constructor)析构函数(Destructor)怎么用?