1

I just download via svn controle version a CakePHP 2.5.2 app to a test server .

After database configuration, the app does not open the css files located at app/webroot dir (bootstrap, jquery, main.css).

Is the some aditional config parameter ?

I try changing the owner but did not work.

7
  • Mke sure app/tmp is writable and that debug is at least 2 in /app/Config/core.php Configure::write('debug', 2); Commented Dec 4, 2015 at 14:02
  • Are they located at app/webroot/css or like u wrote at app/webroot? Commented Dec 4, 2015 at 15:00
  • @Yash it is a regular cakephp install nothing special Commented Dec 4, 2015 at 15:57
  • @WayNe they are at app/webroot/css . The files are really there Commented Dec 4, 2015 at 15:58
  • @InigoFlores debug is already configured to level 2 Commented Dec 4, 2015 at 16:00

1 Answer 1

3

It looks like a mod_rewrite problem.

Make sure you have .htaccess in your DocumentRoot, and your Apache server is configured properly.

Everything is described in detail in the CookBook.

CakePHP 2.x URL Rewriting


Edit: As described in the comments, it was solved by the OP by replacing the Directory definition in the apache vhost configuration file (/etc/apache2/sites-available/default.conf) with the following:

<Directory /var/www/> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride FileInfo 
    Order Allow,Deny
    Allow from all 
</Directory>
Sign up to request clarification or add additional context in comments.

3 Comments

mod_rewrite is enabled checking with apache2ctl -M and these are the rules present in the .htacces: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] </IfModule>
Solved! after edit /etc/apache2/sites-available/default.conf adding : <Directory /var/www/> Options Indexes FollowSymLinks MultiViews # changed from None to FileInfo AllowOverride FileInfo Order allow,deny allow from all </Directory> thank´s for the suppport.
Yeah! for users wit apache 2.4+ it will be apache2.conf or https.conf. Follow more instructions from docs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.