我建立一个Zend website.The项目(本地)具有以下结构:Apache,我可以有多个documentRoot?
/app
/controllers
/views
/public
/css
/images
/js
.htaccess
index.php
因为的.htaccess和index.php的文件驻留在公共个目录,公共目录必须是apache的识别作为网站的文档根目录和根目录。
所以我应该在httpd.conf文件中编辑“DocumentRoot从c:/ wamp/www /到c:/ wamp/www/my-zend-app/public”。 但是,如果我这样做,我不能达到我的其他项目里面的“c:/ wamp/www /”..我可以同时保持documentRoots?
EDIT 我试图在取消大约 “的httpd-vhost.conf” 在httpd.conf线和编辑的文件:
[httpd的-vhost.conf]
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:\wamp\www\my-zend-app\application\public"
ServerName website.loc
ErrorLog "C:\wamp\www\my-zend-app\application\public\error.log"
CustomLog "C:\wamp\www\my-zend-app\application\access.log" common
</VirtualHost>
右后编辑Windows主机文件中加入:
127.0.0.1 website.loc
,但它不是working.I'm运行WAMPSERVER 2.1
使用一个[别名](http://httpd.apache.org/docs/2.0/mod/mod_alias.html)如果你需要一个更低的根。 – Orbling