Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP with Homestead

I'm trying to do some cakePHP development using my existing homestead installation I use for Laravel.

I can get the application running but it says that 'URL rewriting is not properly configured on your server.'

I tried to use the instructions to configure nginx but did not have much luck.

Has anyone gotten url rewriting to work, or can point me at any sources?

I know their is a vagrant setup for cakephp, but I'd rather continue to use homestead if possible.

like image 599
huntsfromshadow Avatar asked Jun 24 '26 11:06

huntsfromshadow


1 Answers

SSH into your Homestead VM.

Edit /etc/nginx/sites-available/your-site.app and add /webroot to the line that looks like: root "/home/vagrant/your-site"; so that it looks like root "/home/vagrant/your-site/webroot";

Restart nginx with: sudo service nginx restart

Your should find your CakePHP pages can find their static content.

like image 55
Richard Avatar answered Jun 27 '26 03:06

Richard