In writing this article, the landlord has been hungry, because I started from 3 o'clock in the Hush Framework, took a lot of detours, iron to hot, first the basic process recorded, left to read, and record where easy detours, especially for a newer like me , it really is a huge toss of people.
Since it is written to configure the Hush Framework framework, then for its understanding, I will not say more here, in short, is a built in the Smarty and Zend framework of the PHP development framework, combined with a bit of both, abandoned the Zend framework cumbersome.
First you have to learn to configure the virtual host on Apache (Vhost), in fact, I have not understood the virtual host is what the guy, only until it is a Web access to a URL address, after today's toss, finally understand that Vhost is a host of another for external, such as browser access to the file directory.
Why do you use Vhost? is because we are opening Web Access addresses to another.
After using XAMPP, you can open localhost/xampp this address, and this address points to the "Xampp root directory \htdocs\", this thing XAMPP server has been set, and the default open 80 port, then if we want to separate web address it, You have to use Vhost to set it up.
How to set Vhost?
1, of course, first of all need Apache server, here we borrow xampp a set of services, inside has integrated Apache server, we open Directory file: xampp root directory \apache\conf\extra\httpd-vhosts.conf
2. Add the following code to the httpd-vhosts.conf file:
1 <virtualhost *:80>2 DocumentRoot"E:/program_software/php/hush-master/hush-app/web/backend"3 ServerName hush-app-Backend4 <directory/>5AllowOverride All6Require all granted 8 </virtualhost> 9 10 <virtualhost *:80> 11 documentroot e:/ Program_software/php/hush-master/hush-app/web/frontend " 12 ServerName hush-app-frontend 13 <directory/>14 allowoverride all15 Require all Granted16 </directory>17 </ Virtualhost>
This directory is my Hush framework of the demo directory, you can download the framework yourself, placed in any directory can be.
Pay special attention to the following code:
1 <directory/> allowoverride all Require all granted4 </Directory>
Many people may write:
1 <directory/> allowoverride all Order deny,allow from all5 </ Directory>
I do not know what the reason for the second kind of failure, anyway, I tried, every time I open the new address, all prompt "Access Denied", may be my computer and other places need to authorize.
3, Next is to do the local address and vhost address mapping work
Open a C:\Windows\System32\drivers\etc\hosts file and add two sentences:
127.0.0.1 hush-app-frontend127.0. 0.1 hush-app-backend
This can be done by
Http://hush-app-frontend/and http://hush-app-backend/come to the front and back of the demo that comes with the hush framework.
---------------------------------------vhost config End------------------------------------------------
Is that it? What else hasn't been done? Of course the Hush Framework itself is installed Ah, what? Is this going to be installed? It's naïve if you think so.
Installation of this is not difficult, of course, the premise is that you have more configuration of the basis of the environment, like I have a lot of configuration, the early configuration of the IIS6 site, the 2010 Android development environment, to the current NDK and COCOS2DX, anyway, is a lot, with the refined.
I will not say in detail, there are a few places to note:
1, need to configure the environment variables PHP, such as I do:
New Php_home:php.exe Absolute Address new Mysql_home:mysql Bin directory, note Oh, if you have Xampp, PHP and MySQL are integrated OH.
How do I add php_home and mysql_home to the path? Know everyone knows: add%php_home%;mysql_home at the end of path;
2, the purpose of configuration PHP and MySQL is to run the hush framework of the initialization of the batch file Hush.bat, the file address is "... \hush-app\bin\hush.bat"
Of course, not directly double-click Run, need to give this batch under some commands, with CMD into the directory where the Hush.bat, input: Hush SYS init
After execution began to initialize the Hush framework, during the request to enter the database account information, the matter must be re-written, if you write wrong, bat will quit, what to do, re-execute the Hush sys init with cmd, and then do it again.
---------------------------------------Hush Framework config end----------------------------------------
At this point, everything is OK. Open http://hush-app-frontend/to verify:
Hush Framework Configuration (RPM)