CakePHP 3 Apache没有找到Views

I am just starting to work with CakePHP3.0 and while following the 'Quick Start Guide' I came across a step that has me stuck.

The section labeled DATABASE CONFIGURATION has me create some MySQL tables (I copy pasted from the site) and then run the commands: bin/cake bake all bookmarks, bin/cake bake all users, and bin/cake bake all tags.

After running those three commands several files have been generated; the Models and Controllers associated with the tables I just created. However, the Views have not been created...By the way I am using Ubuntu 12.04

As suggested by the tutorial I checked my apache2/mods-enabled directory for the rewrite.load and it is there.

Has any else experienced this issue? It is likely that I am making a simple mistake

This is the output when I ran bin/cake bake all bookmarks the first time: enter image description hereenter image description here

As the tutorial suggested, if I receive a 404 page not found error I should make sure that mod_rewrite is enabled for apache2, also I noticed that it says to use http://localhost:8765/bookmarks since my web server is configured on port 80 I have been ignoring the port # suggested by the tutorial.

Here is a screenshot of my apache2/mods_enabled/: (rewrite.load is present) enter image description here

Lastly, here is the data source that I have configured in /config/App.php: enter image description here

It is beginning to appear that the problem is with my Apache configuration and the rewrite rules. I will investigate into this further.

Turns out that I was initially confused about what CakePHP3 was supposed to create and realize now that it was running as expected (see question above for output). One the proper DocumentRoot is set, if rewrite is not set up properly navigating to you page may begin a download of the file you mean to view instead.

The real problem was with my Apache configuration. These are the steps I followed to configure Apache 2.4 (after reinstalling Apache):


  1. Add the new DocumentRoot in /etc/apache2/sites-available/000-default.conf and in /etc/apache2/sites-enabled/000-default.conf

  2. Enable mod_rewrite: a2enmod rewrite

  3. Restart Apache: service apache2 restart


After enabling rewrite your /etc/apache2/mods-enabled/ may look like this(notice rewrite highlighted): rewrite_enabledProblem has been resolved. Thanks to this post!

@user1843159 - Thanks for pointing me toward the direction of Apache Configuration.