1.保证httpd.conf下

LoadModule php5_module "D:/E/php/wamp/bin/php/php5.5.12/php5apache2_4.dll"
PHPIniDir E:/wamp/bin/php/php5.5.12

这两个没被注释掉

2.打开多站点配置:
httpd.conf下面:Include conf/extra/httpd-vhosts.conf 去掉前面注释

3.httpd.conf下监听端口(这个好像原来老版本不是这样配置的,所以模仿第一个80的端口,可以写出8080的端口)

Listen 0.0.0.0:80
Listen [::0]:80 #listen to 8080
Listen 0.0.0.0:8080
Listen [::0]:8080

4.http-vhosts.conf配置(注意 Require all granted,不要写成什么allow from all什么的,可以参考httpd.conf中的写法。)

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wwwroot/think"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
<Directory "E:/wwwroot/think">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:8080>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/wwwroot/test"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
<Directory "E:/wwwroot/test">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost> 

注意
修改正确的项目根目录 E:/wwwroot/test 和 E:/wwwroot/think
Require all granted不要写成 allow from all 之类的,apache版本高了 语法也变了。
现在可以访问 localhost:80和localhost:8080了

最新文章

  1. C语言 &#183; 4-3水仙花数
  2. Linux下安装 MySQL
  3. Cesium原理篇:3最长的一帧之地形(2:高度图)
  4. js中属性和方法的类型和区别
  5. Lucene.net 实现近实时搜索(NRT)和增量索引
  6. js的隐含参数(arguments,callee,caller)使用方法
  7. 使用docker搭建nfs实现容器间共享文件
  8. HTML新特性之一----canvas
  9. white-space norma nowrap强制同一行内显示所有文本文字,让所有文字内容中一排显示不换行
  10. Linux下which、whereis、locate、find 区别
  11. SpringCloud Eureka 报错 无法启动问题
  12. web前端(1)——了解什么是前端,以及与后端的关系
  13. bzoj 1257: [CQOI2007]余数之和 (数学+分块)
  14. 20190316xlVba_设置行高的改进方案
  15. Mapreduce入门和优化方案
  16. python基础知识回顾之元组
  17. SCPD
  18. VS中快捷键修改以及快捷键的查看
  19. thinkphp3.2 输入框默认值
  20. SQL Server2008 R2 数据库镜像实施手册(双机)

热门文章

  1. 【数据结构】二叉树(c++)
  2. chrome自带的调试工具
  3. 尝试使用UISearchDisplayController及对苹果对控件封装习惯的理解
  4. 2016/06/02 网摘记录 svn 服务器端 客户端 安装使用
  5. HBase运维基础--元数据逆向修复原理
  6. nodejs的request模块
  7. vue、react、angular三大框架对比
  8. JSP 用poi 读取Excel
  9. oracle问题系列 : ORA-02290: 违反检查约束条件
  10. get all sites under IIS