2011-07-28 44 views
-1

我正在开发一个Zend应用程序,该应用程序应安装在我无法访问的主机上。我有两个问题:同一主机上的多个Zend应用程序

  1. 在服务器上没有zend-server-ce安装。
  2. 应用程序应该安装在一些其他CMS'es,如wordpress和Jumla旁边。

有两种选择可供我实现,第一种是将每个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 

我不能在主机上某些特定的文件夹配置文档根目录。目前,我配置我的本地机器改变/etc/apache2/httpd.conf对虚拟主机:

NameVirtualHost *:80 
<VirtualHost *:80> 
     DocumentRoot "/var/www/my_project/name/public" 
     ServerName pl.localhost 
</VirtualHost> 

所以,我应该为我不访问到它的阿帕奇在主机上做相同的吗?

+0

你将如何修改Apache的配置_ON,我不访问it_ – Subdigger

+0

我主机意思是我想知道我应该怎么做... –

回答

-1

至于我 - 更好的方法是使用子域。

配置FO例如blog.host.com 的DocumentRoot - 是的index.php

<VirtualHost *:80> 
     DocumentRoot "/var/www/blog.host.com/www" 
     ServerName blog.host.com 
</VirtualHost> 

为Zend的应用程序的完整路径 - 刚刚看了文档/ 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

还检查Apache的文档的optionsAllowOverride

的详细信息

+0

我没有访问Web服务器的Apache!你也没有说我应该为zend库做些什么? –

+0

@Sorush Rabiee然后如果你没有访问服务器的问题是什么 - 那么你不能放任何东西。关于zend库...只需将它们放到项目的/ library文件夹中即可(通过http'/ home/subdigger/libs/Zend/Library'无法访问每个项目或顶级文件夹)并像include或set_include_path一样使用它。 – Subdigger

+0

我可以把文件放在服务器上,但不能编辑虚拟主机的'/ etc/apache/httpd'并且启用覆盖。 –

相关问题