我建立一個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