I'm trying to deploy a cakephp application into my peers system and i get 404 error, for all requests. This is not cakephp 404 error, but a normal webserver 404 page not found error. :( . We both use MAC OS 10.6. The same code works on my machine and on the production system. I have followed the steps to deploy on his machine. I'm using cakephp advanced installation, i.e, webroot contain only index.php, css, js,etc. The APP folder and CAKE folder is located elsewhere.
- uncommented the line "LoadModule php5_module...." in /etc/apache2/httpd.conf
- Changed to AllowOverride All to the Directory - "Library/WebServer/Documents" in /etc/apache2/httpd.conf
- uncommented and set date.timezone in /etc/php.ini
- Copied the webroot contents to "Library/WebServer/Documents" and modified index.php to adapt to his machine (setup 3 relevant paths to the CORE, APP and CAKE folder)
- made sure the DB connection is good.
- For debugging purpose, Modified core.php and set Configure::write('debug',3);
The homepage get data from an AJAX call. WHen i goto http://localhost, the header and footer contents from the layouts/default.ctp are rendered, but the ajax call which is for example http://localhost/posts/showmyposts gets a 404 (Not Found) error. If I goto to other URLs like http://localhost/users/login, I get the normal webserver 404 error.
Not Found
The requested URL /users/login/ was not found on this server.
In my apache error log, i get the error as
[Mon May 16 16:19:48 2011] [error] [client ::1] File does not exist: /Library/WebServer/Documents/users, referer: http://localhost/ Is my cakephp installation correct ?