Specifically, you’ll probably need to edit /etc/apache2/nf once again and uncomment the lines for including PHP (L118) and enabling Virtual Hosts (L478). If the problem is “Symbolic link not allowed or link target not accessible”, confirm that your symlinked folder, it’s parent directory, et al, have sufficient permissions for owner and group ( ).īe aware that with every upgrade OS X is likely to overwrite your edits to Apache’s nf file. You can open it from inside Terminal: sub /var/log/apache2/error_log Later, if apache ever goes south and starts spitting 403 Forbidden, or some other error, check the error log. This means I’ve created a separate pointer for each domain in my hosts file, and a separate container for each in my apache. In my setup I’ve registered v to point to my ~/Sites/ folder, rzen.wp to point to ~/Sites/wordpress/, and rzen.php to point to ~/Sites/phpMyAdmin. Finally, flush the DNS cache & Restart Apache (you’ll want to do this any time you edit your hosts file and virtual hosts setup):.Options FollowSymLinks Indexes MultiViews In Terminal: sub /private/etc/apache2/users/ nf.Update: If you’d rather have “*.dev” dynamically mapped to “~/Sites/traffic locally.įor the example below, you’ll want to replace “ v” with your own custom URL, and “ username” with your own OS X username. If you’re running OS X 10.7 or earlier, you’ll also need to enable “Web Sharing” in System Preferences > Sharing.Uncomment the include Virtual Hosts (L477 in OS 10.8, L623 in older releases).Uncomment the include for PHP5 (L117 in OS 10.8, L111 in older releases).Update nf to enable PHP5 and Virtual Hosts: Update post_max_size to something like 64MB (L740 in OS 10.8).Update upload_max_filesize to something like 64MB (L891 in OS 10.8).In Terminal: sudo cp /etc/ /etc/php.ini.These steps are really only to keep you sane while testing uploads and such in your projects: Finally, configure MySQL socket (because OS X is looking in the wrong directory):.Add this line to the file: export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH".“vi” for Vim, or “mate” for TextMate, or “subl” for the standard Sublime shortcut). You can substitute “sub” for your text editor of choice (e.g. In many of the terminal instructions I use my custom bash shortcut “sub” to open a given file in Sublime Text 2 via command line. It will likely be much faster than asking me for help, and will benefit everyone who reads this (me included)! A Quick Word about my Terminal Commands If you get stuck with an issue, I suggest googling around and sharing what you discover here in the comments. These instructions work for me, but they might not work for you. It’s worth mentioning here that I’m not a very smart guy, which is why I’ve kept these detailed notes for the last 4 years. Also, it has always bothered me that MAMP bundled its own copies of PHP, Apache and MySQL when the only missing component that doesn’t come pre-loaded with OS X is MySQL. I never liked having a separate application running just so I could access my local dev setup. If you’re wondering, I like to set up my local environment, instead of using MAMP, because I prefer to have it always available. I might write some follow-up posts about using this setup to create a killer local WordPress Multisite installation, and also porting your dev environment contents to live in DropBox. Running 10.4 or lower? You should probably upgrade □ These instructions have been updated to specifically support OS X Mavericks (10.9), but will work with Mountain Lion (10.8), Lion (10.7), Snow Leopard (10.6), and Leopard (10.5). As such, this post is mostly for my own benefit, and I will regularly update it as my process changes (usually with each new OS X release). I’ve curated these instructions over the course of 4 years, so they are littered with links to relevant source material and have been stripped down to the exact actionable steps I need to take to get up and running. These are my personal notes that I use every time I reformat or get a new computer. If you’re a WordPress developer, specifically check out Varying Vagrant Vagrants (VVV) by 10up. I still use the exact environment I detail below, but am leaning towards Vagrant soon. Update: If you’re just getting started now, I strongly recommend looking into Vagrant instead of rolling your own environment like I describe.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |