开发者

Multiple Zend applications on same host

I'm developing a Zend application that should be installed on a host that I don't access to it. I have two problems:

  1. On the server there is no zend-server-ce installation.
  2. Application should be installed beside some other CMS'es like wordpress and Jumla.

There is two choices available for me to implement, first one is place each cms in a sub-domain and second is pl开发者_开发技巧ace each cms in a folder.

for example first one may look like this:

blog.host.com --> for Wordpress
contents.host.com --> for Jumla 
management.host.com --> for zend application

and second one may be:

host.com/blog --> for Wordpress
host.com/contents --> for Jumla 
host.com/management --> for zend application

I can't configure Document Root for some specific folder on host. Currently I configured a virtual host on my local machine changing /etc/apache2/httpd.conf to:

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

So what should I do for doing same on a host that I don't access to it's apache?


as for me - better way is to use sub-domains.

config fo example blog.host.com DocumentRoot - is a full path to index.php

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

for zend application - just read docs/README.txt in your project witch looks like:

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>

but when deploying Indexes better set to -Indexes to disallow browsing your files.

EDIT 1

also check apache doc for options and AllowOverride

for detailed information

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜