Davide Gualano
Davide Gualano

Reputation: 13003

Set up a Zend project in OS X

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.

Upvotes: 0

Views: 1098

Answers (1)

Chris O&#39;Connell
Chris O&#39;Connell

Reputation: 21

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 :)

Upvotes: 2

Related Questions