dongzi4030 2010-10-29 10:07
浏览 27

在OS X中设置Zend项目

I'm trying to set up a new Zend project using Zend Server CE under OS X 10.6
First, I have downloaded and successfully installed Zend Server CE: opening http://localhost:10081 in my browser shows the dashboard, and everything seems to be working fine.

Than I created a new project, following the tutorial:

$ cd /usr/local/zend/apache2/htdocs  
$ /usr/local/zend/share/ZendFramework/bin/zf.sh create project quickstart

The project was created without errors.

Then I added

<VirtualHost quickstart.local:10088>
    ServerName quickstart.local
    DocumentRoot /usr/local/zend/apache2/htdocs/quickstart

    SetEnv APPLICATION_ENV "development"

    <Directory /usr/local/zend/apache2/htdocs/quickstart>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

to the /usr/local/zend/apache2/conf/extra/httpd-vhosts.conf file and the entry 127.0.0.1 quickstart.local to my /etc/hosts/ file.

Finally, I restarted the Apache bundled with Zend Server CE.

But now, if I open http://quickstart.local:10088/ in my browser, I see this: alt text

instead of the default index view I was expecting.

What a I missing?

Thanks.

  • 写回答

1条回答 默认 最新

  • douao8353 2010-11-18 05:33
    关注

    I was having a hell of a time trying to figure out the directions from "Zend Framework Quick Start" Even though you didn't solve it, you pointed me in the right direction and I was able to get it. You probably figured it out by now but for everyone else coming to this page here goes:

    By default the httpd.conf file has the 'Include httpd-vhosts.conf' line commented out. So edit /usr/local/zend/apache2/conf/httpd.conf to change this line:

    #Include conf/extra/httpd-vhosts.conf
    

    to this line:

    Include conf/extra/httpd-vhosts.conf
    

    We are almost done now. The code you added to /usr/local/zend/apache2/conf/extra/httpd-vhosts.conf wasn't quite correct. It should be:

    <VirtualHost quickstart.local:10088>
        ServerName quickstart.local
        DocumentRoot /usr/local/zend/apache2/htdocs/quickstart/public
    
        SetEnv APPLICATION_ENV "development"
    
        <Directory /usr/local/zend/apache2/htdocs/quickstart/public>
            DirectoryIndex index.php
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>
    

    Notice how I added the /public onto the paths. Otherwise you won't point to the index.php file. Now restart Apache using this command sudo /usr/local/zend/bin/zendctl.sh restart and it should now be working. Happy coding :)

    评论

报告相同问题?

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)