In a development project, it is often the use of SVN to control the version, and it is natural to adopt the trunk branch for security.
Think of the way we can use a configuration domain name in a project?
This is explained below:
My project is called demo inside there are two files trunk (trunk)/branches (branch) host:127.0.0.1 Trunk.demo.dev. Own domain Name
<virtualhost *:80>
DocumentRoot "C:/wamp/www/demo/trunk/public"
ServerName Trunk.demo.dev. Own domain Name
setenv Application_env Dev
Adddefaultcharset UTF-8
</VirtualHost>
<virtualhost *:80>
Serveralias *(1). Demo.dev. Own domain Name
setenv Application_env Dev
Adddefaultcharset UTF-8
Usecanonicalname OFF
Virtualdocumentroot "c:/wamp/www/demo/%1/%2(2)/public"
</VirtualHost>
To the above (1) Explanation: Serveralias pan domain name * after the "Demo.dev. Own domain name" This domain is a fixed domain name
To the above (2) explanation: such as input branches.master.demo.dev. own domain name =>virtualdocumentroot "c:/wamp/www/demo/branches/master/ Public to generate the path dynamically.
Reference: Http://www.jinbuguo.com/apache/menu22/mod/mod_vhost_alias.html#page-header
Create a dynamic virtual host configuration