Hey,
/usr/local/bin is definitely NOT good idea to put your sites' files in.
There are two ways in Mavericks you can go:
I think you want to setup the system provided Apache and PHP. There are two directives that may confuse you:
ServerRoot "/usr"
DocumentRoot "/Users/username/Sites"
So you should put your Laravel application inside /Users/username/Sites folder. If the Sites folder doesn't exist, just create it inside your home folder.
However, If you want to run your laravel application, you don't have to put the app inside the /Sites/ directory. As for PHP 5.4 - the webserver is included. So just go inside your /laravel/ folder and run command:
php artisan serve
This will boot your app and make it accessible via http://localhost:8000/.
if you do not want to mess around with your system use vagrant: http://culttt.com/2013/06/17/setting-up-vagrant-with-laravel-4/ https://github.com/bryannielsen/Laravel4-Vagrant
+1 for what herko said. I have MySQL installed locally and just run the website from the site's "public" directory using the built-in web server in PHP:
php artisan serve
You can also do this, if port 8000 doesn't suit your needs:
php artisan serve --port=8080
... or whatever port you need.
I was able to get things working after modifying my DocumentRoot at httpd.conf to /Users/username/Sites/
then modify the default .htaccess and add RewriteBase
Options +FollowSymLinks
RewriteEngine On
RewriteBase /your/folder/public
Then this will work on Mavericks
Hope this helps.
+1 on using vagrant. if you have a computer that can run virtual machines, this should the top option. when developing, it's a good idea to develop in an environment that closely mimics your production server. yes OSX is unix but running a VM with linux is probably better.
i've tried creating a dev environment on OSX and all i end up doing is mucking up my OS environment. i tried mamp for years but i just didn't get that tight integration. i spent a lot of time creating shortcuts, figuring out how to install modules that were not included in mamp, etc. just out of curiosity, did you get mcrypt installed in your OSX? after seeing the tutorial for this, it gave me another reason to just run a VM. just want my OS X to stay "clean".
I agree with using vagrant to develop with the end machine in mind. Way less hassles to making sure your environments are similar.
However, I really don't see any issues of using the built in Apache and php with OSX. I've done this since OSX beta and I love not having to dink around with Mamp or xamp. Also, vagrant can be issue when OSX is upgraded.
Homebrew also deserves kudos for making OSX even better!
I use xamp when I need a quick reason to downgrade to php5.2. Beyond that ... I just keep twerking my internal install.
However, everybody has preferences so do what works best for you :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community