2011-07-28 42 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'並且啓用覆蓋。 –

相關問題