Former code: http://echo.co/blog/os-x-109-local-development-environment-apache-php-and-mysql-homebrew
Some parts taken from: https://gist.github.com/kujohn/7209628
ipfw
is officially deprecated and removed in OS X Yosemite. Pow requires another program pf
to handle the port forwarding.
Note: While this does forward port 80, I haven't figured out how to get apache to see the incoming domain to make things like project.dev work correctly. If anyone gets that to work, please let me know how. (So visiting http://localhost/ or http://localhost/~username/ works as expected. Visiting http://project.dev does not.) I ended up starting apache as root and running it as _www for now.