zend framework virtualhost设置方法
Phpunit 的用法 php phpunit.phar 就可以运行phpunit了
修改本地域名vhost
F:\Tools\wamp\bin\apache\apache2.4.9\conf\extra 下的httpd-vhosts.conf 下面添加这几行
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot F:/Tools/wamp/www
</VirtualHost>
<VirtualHost *:80>
ServerName zf2-tutorial.localhost
DocumentRoot F:/Tools/wamp/www/zendtry2/public
SetEnv APPLICATION_ENV "development"
<Directory F:/Tools/wamp/www/zendtry2/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
注意第一行那个NameVirtualHost *:80 一定要加,下面这一段一定要加,上面那一段貌似无所谓
然后修改httpd.conf
a、将 LoadModule vhost_alias_module modules/mod_vhost_alias.so 前的#去掉
b、将 Include conf/extra/httpd-vhosts.conf 前的#去掉
然后修改hosts文件
127.0.0.1 zf2-tutorial.localhost
就可以访问 zf2-tutorial.localhost/ 了,注意一定要加上后面那个/ 否则变成浏览器搜索了。
对于phpunit,那三个文件都需要进行修改,boottrap修改namespace,xml修改directory,config modules修改成对应的
本来http://zf2-tutorial.localhost/album 是访问不了的,结果我把unitest的错误改好后这个自然也好了,不过应该没有关系才对。
zend framework virtualhost设置方法的更多相关文章
- Zend framework重定向的方法
zend framework重定向的方法有三种.render, forward, redirect.它们各自的用法是什么样子的呢?有什么区别呢? 一.render render是用来调视图用的,不会调 ...
- Zend Framework 1 - Quick Start
创建 Zend 项目 要创建 Zend 项目,首先要下载并解压 Zend Framework. 安装 Zend Framework 下载最新的 Zend Framework 1.12.20 源码包,( ...
- WAMP下 搭建Zend Framework(Hello World)实例
一.环境搭建 1.下载安装Zend Framework,此步骤不再详细叙述 2.配置php.ini文件 打开php.ini文件,可以找到如下的代码: ; Windows: "\path1;\ ...
- Zend Framework 2参考Zend\Authentication(摘要式身份验证)
Zend Framework 2参考Zend\Authentication(摘要式身份验证) 介绍 摘要式身份验证是HTTP身份验证的方法,提高了基本身份验证时提供的方式进行身份验证,而无需在网络上以 ...
- Zend Framework 2参考Zend\Authentication(HTTP认证适配器)
Zend Framework 2参考Zend\Authentication(HTTP认证适配器) 介绍 Zend\Authentication\Adapter\Http提供了RFC-2617, Bas ...
- Zend Framework 2参考Zend\Authentication(数据库表认证)
+ 转载自:Zend Framework 2参考Zend\Authentication(数据库表认证) 介绍 Zend\Authentication\Adapter\DbTable提供对存储在数据库表 ...
- Zend Framework 2参考Zend\Authentication(Zend\Authentication介绍)
原文:Zend Framework 2参考Zend\Authentication(Zend\Authentication介绍) Zend\Authentication组件提供了认证接口和具体的通用的认 ...
- 转:Zend Framework 2.0 分析
文章来自于:http://bbs.phpchina.com/thread-268362-1-1.html ZF2已经发布,与ZF1相比,MVC这一模块内部的实现机制可谓大相径庭,许多用过ZF1的PHP ...
- Zend Framework 留言本实战(转)
一.环境搭建和ZF安装 *[注]本节内容大部分来至Zend Framework官方手册 1.1 Zend Framework下载 Zend Framework 使 ...
随机推荐
- SQL递归查询(with cte as) 物料分解
需求 最近在做一个MRP的项目,需要根据生产下达的计划从原始无聊表中分解出成品所需要的原材料和数量. 参考 http://www.cnblogs.com/xqhppt/archive/2011/02/ ...
- Http的Post和Get
原文:http://www.cnblogs.com/hyddd/archive/2009/03/31/1426026.html Http定义了与服务器交互的不同方法,最基本的方法有4种,分别是GET, ...
- Oracle如何禁止并行
PURPOSE ------- To explain how to disable Parallel Execution on Session/System level SCOPE &am ...
- C 各种数据类型介绍
1.各种数据类型介绍: 基本数据类型最主要的特点是,其值不可以再分解为其它类型.也就是说,基本数据类型是自我说明的. 1.1整型 整形包括短整型.整形和长整形. 1.1.1短整形 short a=1; ...
- java之集合类特性对比分析列表
类集合框架有很多文章都列出了继承关系图,但是我没有找到更清晰的特性对比图,我这里根据使用选择条件总结对比罗列一下它们之间的一些特点.
- [Linked List]Intersection of Two Linked Lists
Total Accepted: 53721 Total Submissions: 180705 Difficulty: Easy Write a program to find the node at ...
- not valid for Running the scheme
The run destination iPhone6 Plus is not valid for Running the scheme 'MyApp’. Phone6 Plus's iOS 8.0 ...
- JavaScript学习笔记(三)this关键字
this是Javascript的关键字,代表在函数运行时,自动生成一个内部对象,只能在函数内部使用.例如: function test() { this.x = 1; } 随着函数的使用场合不同,th ...
- firemonkey打开子窗体(匿名回调函数)
procedure TForm1.Button1Click(Sender: TObject);varChildForm: TForm2;beginChildForm := TForm2.Create( ...
- MYSQL 简单的循环存储过程
BEGIN ; ; DO DO ); ; ) THEN ; END IF; END WHILE; ; ; END WHILE; END