Configure CakePHP in Ubuntu

Configure CakePHP on Linux/Ubuntu is a bit tricky as you have to on the mod-rewrite and set the AllowOverride property from None to All.
1. mod_rewrite is a part of Apache server that can rewrite requested urls on the fly. To enable mod_rewrite in Ubuntu, you just need to write this command in terminal:

[sourcecode language=’php’] sudo a2enmod rewrite [/sourcecode]

2.Open and edit the default file from this directory /etc/apache2/sites-available/default by using the following command:

[sourcecode language=’php’]
sudo gedit /etc/apache2/sites-available/default[/sourcecode]

Find the following Directory structure:

<Directory /var/www/>

Options Indexes FollowSymLinks MultiViews
AllowOverride None //Change to AllowOverride All
Order allow,deny
allow from all


3.Restart apache using:

[sourcecode language=’php’] sudo /etc/init.d/apache2 restart [/sourcecode]

Your configuratation complete! 🙂
Now you should now be able to view http://localhost/ with the correct css formatting for the cake default page.
Note: To execute the above command you should have sudo/root permission in Ubuntu

16 Responses to “Configure CakePHP in Ubuntu”

  1. Nice . . keep it up

  2. Thank you very much, this will be help full to cakePHP on Linux/Ubuntu.

  3. Reading this reminds me of my old room mate. That guy was one of the smartest characters I know, but he was a little too original for my tastes though. Anyways I loved reading this, thanks. Will give me something to go into when I see him.

  4. I love reading your web site.

  5. Very habitually I go to this webpage. It very greatly is satisfying to me. Thanks the author

  6. Thanks for the Information, thanks for this useful Post. I will come back later .. Great e cigarette reviews : e cigarette reviews

  7. Really nice post. Theoretically I could write something like this too, but taking the time and effort to make a good article is a lot of effort…but what can I say….I’m a procrastinater. Good read though.

  8. The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!

  9. Hmmm, I see exactly what you mean. Also, do you happen to have an RSS feed? I am trying to subscribe to it so I can get your updates. Let me know.

  10. Great post bromance. I like your blog.

  11. Love your site man keep up the good work

  12. Hi thank you for writing this, very beneficial..

  13. This really answered my problem, thank you!

  14. Fantastic goods from you, man. I’ve understand your stuff previous to and you are just extremely great. I really like what you’ve acquired here, certainly like what you’re stating and the way in which you say it. You make it enjoyable and you still care for to keep it wise. I cant wait to read far more from you. This is actually a tremendous site.

Leave a Reply

Your email address will not be published.