douqiong8412 2010-10-11 02:10
浏览 111
已采纳

在共享的cPanel服务器上托管PHP Zend Framework应用程序

I'm trying to deploy an PHP application which is written with Zend Framework to a shared cPanel server.

There are not many tutorials available on this area online, however, I followed several of them. It is successful to run the test page which proves the zend framework is installed correctly.

However, since cPanel server has a default root directory called public_html/, it is impossible to simply rename it to the Zend Server's default public/.

As a result, I had two options in mind: (Say the project name is AAA) 1) upload my projects under the /public_html/ directory, then the project will be like /public_html/AAA/public, and etc. However, this one simply fails to work. My thought would be something wrong here with the baseUrl setting, however, no matter I comment ( which is to remove the baseUrl) or set to the root page, ( in this case /public_html/AAA) both failed.

2) I tried to follow the way listed in this article: http://blog.motane.lu/2009/11/24/zend-framework-and-web-hosting-services/. Still failed.

Can anyone suggest how to do it? Really appreciate your help!

  • 写回答

2条回答 默认 最新

  • douduo2407 2010-10-11 02:56
    关注

    Just symlink it:

    ln -s public public_html

    then this structure will work:

    htdocs/
      myvhost.com/
        public/
        application/
        library/
        public_html # this is actually a symlink pointing to public
    

    Whatever you do, dont just throw everything in the publicly accessible area... its just bad form :-)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?