Apache and Cakephp application

I am running into issues with cakephp application running with CentOs. I did not change any setting in the default config other than added a file under conf.d which content as :

NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/portal/ ServerName abc.mydomain.com </VirtualHost>

When accessed, home page works i.e. app.mydomain.com shows up but none of the CSS,JS and img files are loaded which are under default structure i.e. /var/www/portal/app/webroot/img /var/www/portal/app/webroot/css /var/www/portal/app/webroot/js

So I tried moving them right under /var/www/portal/ and that worked for homepage but clicking on any link on homepage just does 404. e.g. If link is abc.mydomain.com/test In apache log I see the errors as 'File Does not exist : /var/www/portal/test' . It seems that apache is not sending the request to cakephp to process the url.

What could be wrong here? Most likely with the apache security settings but am not sure where to lool.

-------------Problems Reply------------

Is your AllowOverride set to all? Only then the CakePHP rewrite directives which are in .htaccess files start working. Alternatively, you can move them to the virtual host configuration and get them to work.

Ok, this is a common mistake. you should enable "rewrite" --> module rewrite. (this is of course a php module). in ubuntu you usually type sudo a2enmod rewrite. Check for CentOS command.

Category:apache Views:0 Time:2010-12-18

Related post

  • CakePHP application cannot start in localhost 2012-04-21

    I'm trying to get a CakePHP application to work. I use xampp and put my application files in /xampp/htdocs. For .htaccess configuration I refer to http://book.cakephp.org/1.2/view/37/Apache-and-mod_rewrite-and-htaccess . After that I'm trying to run

  • What is the best way to create a tableA HABTM tableA relationship for a CakePHP application? 2008-10-22

    I have the need to create the functionality to allow my registered users to associate themselves with other uses and create a family. My database tables look something like this: db.persons - (Bob, Jane, Timmy, etc) id name email db.persons_persons i

  • Is it possible to use a WordPress session to authenticate to a CakePHP application? 2009-04-20

    What is the best way to use a successful WordPress sign-in attempt to authenticate to a CakePHP application? I don't want to use password synchronization, if at all possible. I'd prefer to keep all of the user details within the WordPress database ta

  • Where should I put CAS session checking code in a CakePHP application? 2009-07-31

    I work for a department of a university that uses CAS to provide single-sign-on authentication, and am writing a CakePHP application that needs to use this CAS service. I need to write code that: Checks with the CAS server to see if the user is logge

  • CakePHP application on a hosted server? 2009-11-12

    How do I run cakePHP application on a hosted server? I have created my own application in CakePHP. It was running fine locally. But when I upload it to server, it's gives a 404 Not Found Error. Can anybody tell me how to upload CakePHP to the hosted

  • CakePHP Application Deployment 2010-01-01

    I am interested in finding out how folks are deploying their CakePHP applications. I have recently been approached about doing some freelance CakePHP development, which would be a nice opportunity for me to get some experience in the presentation tie

  • How to monitor a CakePHP application 2010-02-20

    I would like to get a better insight into my CakePHP application. Ideally, the report would be similar to those generated by New Relic RPM - http://www.newrelic.com/. Are there any plugins or services that can deliver these sorts of reports for CakeP

  • Missing validation message in cakephp application 2010-07-22

    I'm trying to add a layout for a cakephp application but now my validation message is no longer being displayed. When validating a comment on a blog entry, the validation message thats suppose to be at the top is not displayed. --------------Solution

  • Inegration of wordpress in cakephp Application 2010-07-27

    how i can extend the cake-app-authentication, so that the user is automatically logged in to the wordpress blog --------------Solutions------------- Basically it's not plug&play for sure. First of all, your WP blog should be in the same domain as

  • Where should I place text that I'm trying to abstract in my CakePHP application? 2010-08-10

    I am writing a CakePHP application and am trying to have text that is frequently displayed (or particularly long) saved in a config file somewhere that we can easily edit it. Where should i put this file and how do I access it? I am also worried abou

  • Breakpoints are completely ignored when debugging CakePHP application 2010-10-20

    I'm developing in NetBeans a CakePHP application and finally managed to get it connecting to XAMPP debugging sessions (PHP 5.3.1 w/ Xdebug v2.0.6-dev). It perfectly works when launching, it does pause the application on the first line. However any fu

  • Is there a wiki system that can be easily "plugged-in" to an existing CakePHP application? 2010-10-22

    I'm looking for a wiki system, that can easily be incorporated into an existing CakePHP application. I would have done it seperately from the CakePHP application, but the buyer requests that the user authorisation is done from the same tables. ------

  • How to add custom layout and css in a CakePHP application? 2011-05-22

    I'm about to begin developing a CakePHP application, I understand CakePHP is aimed at allowing developers to put a web application together as quickly as possible hence it comes with default CSS and layouts for the views. How would I go about replaci

  • How to connect CakePHP application to Drupal Site? 2011-10-05

    How to connect CakePHP application to Drupal Site Database, AND via RSS generated from Drupal site? Edit: let's say just connect via RSS generated from a Drupal site --------------Solutions------------- mmmm unfortunately there is no project in drupa

  • Make licence to cakePHP application? 2012-02-08

    I have create one application in cakePHP for 1 client. Now I want to encrypt that code because I don't want client to distribute the code for others. But which file I should encrypt because cakePHP is open source any file which I will encrypt client

  • Automatically running an unrelated action in cakePHP application 2012-02-14

    I am working on a small application to provide quotes for custom products. It's my first cakePHP application. Many of the fields for the products are calculated automatically when a product is added or saved. The calculations use valuse stored in the

  • Is it possible to deploy cakephp applications on google app engine? 2012-03-19

    I recently read that php applications can be deployed on Google App Engine using Quercus. Is it possible to deploy cakephp applications too? Also, from the developers point of view, is there any difference between developing applications for cloud an

  • Using plugin built-in translations in a CakePHP application 2012-03-20

    I am using a couple of plugins in a CakePHP application that come with predefined translations in their Locale directories. However, despite I have set the language setting, messages from these plugins are not being translated. First question: can Ca

  • Performance tuning CakePHP application 2009-11-26

    I just got this quite large CakePHP app (about 20k lines of code), which isn't very clean and there is no documentation at all. The app is running in production, but it has really major problems with performance. Server is Quad core with 8GB RAM, but

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.084 (s). 11 q(s)