我正在开发一个应该安装在我无法访问它的主机上的Zend应用程序。我有两个问题:
有两种选择可供我实施,第一种是将每个cms放在子域中,第二种是将每个cms放在一个文件夹中。
例如,第一个可能看起来像这样:
blog.host.com --> for Wordpress
contents.host.com --> for Jumla
management.host.com --> for zend application
,第二个可能是:
host.com/blog --> for Wordpress
host.com/contents --> for Jumla
host.com/management --> for zend application
我无法为主机上的某个特定文件夹配置Document Root。目前,我在本地计算机上配置了一个虚拟主机,将/etc/apache2/httpd.conf
更改为:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/var/www/my_project/name/public"
ServerName pl.localhost
</VirtualHost>
那么我应该怎样做才能在我无法访问apache的主机上做同样的事情呢?
答案 0 :(得分:-1)
至于我 - 更好的方法是使用子域。
配置示例blog.host.com DocumentRoot - 是index.php的完整路径
<VirtualHost *:80>
DocumentRoot "/var/www/blog.host.com/www"
ServerName blog.host.com
</VirtualHost>
用于zend应用程序 - 只需阅读项目中的 docs / README.txt ,如下所示:
README
======
This directory should be used to place project specfic documentation including
but not limited to project notes, generated API/phpdoc documentation, or
manual files generated or hand written. Ideally, this directory would remain
in your development environment only and should not be deployed with your
application to it's final production location.
Setting Up Your VHOST
=====================
The following is a sample VHOST you might want to consider for your project.
<VirtualHost *:80>
DocumentRoot "/mnt/winc/www/zend_test/public"
ServerName zend_test.local
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "/mnt/winc/www/zend_test/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
但部署Indexes
时更好地设置为-Indexes
以禁止浏览您的文件。
编辑1
还要检查options的apache文档 和AllowOverride
了解详细信息