1

It seems I set up everything correctly. I received no errors.

I used zf create project and it created the project no problem.

I went to localhost/site and instead of showing the welcome to zend page it opens the directory and shows me its contents. I have to go to localhost/site/public to see that page.

I tried creating a new public action in the controller and added a file in the view scripts portion but it didn't show up.

The project is located in /var/www/html directory

What could I have forgotten?

Steps I took:

Updated repositories before downloading and installing stuff

Install linux

install apahce

install mysql

install php

install phpmyadmin

install zend framework minimal

install phpunit

install subversion (but did not combine it with zend)

That's about it, I didn't do anything more than that.

1 Answer 1

3

By default it is assumed you will run the project from a Virtual Host with the DOCUMENT_ROOT pointed at /path/to/project/public If you want to run the site in a subdirectory then this subdirectory should only contain the contents of what is currently in public, and you would need to modify the configuration settings to run with this setup.

Check out the Quickstart section "Create a Virtual Host" for more info.

The easier option here is just to create a Virtual Host for the project and add a host entry to /etc/hosts like:

127.0.0.1 zfproject.local 
Sign up to request clarification or add additional context in comments.

3 Comments

zfproject.local , zfproject being my project's name?
I'm running on linux fedora 14, I created the zend project in the /var/www/html directory.
well you can name the host whatever you want as long as the entry in /etc/hosts matches up with the ServerName directive in your virtualhost container. Assumming the html directory is the DOCUMENT_ROOT for the default server, youll want to move your project folder up a level so that nothing is accessible via the web other than public... Im not too familar with Fedora conventions since i usually use Debian based distros so you may have to add some additional Directory and/or Location directives and modify some permissions to get it set up properly.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.