mkdir ~/Sites
sudo vi /etc/apache2/users/*.conf
and set your config to look like this
<Directory "/Users/*/Sites/">
Options All
AllowOverride All
Require all granted
</Directory>
sudo vi /etc/apache2/extra/httpd-vhosts.conf
and set your config to look like this (replace 'username')
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/username/Sites
</VirtualHost>
sudo vi /etc/apache2/httpd.conf
and uncomment:
LoadModule authz_core_module libexec/apache2/mod_authz_core.so
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
and also:
Include /private/etc/apache2/extra/httpd-userdir.conf
sudo vi /etc/apache2/extra/httpd-userdir.conf
and uncomment:
Include /private/etc/apache2/users/*.conf
sudo apachectl start
http://localhost/~username/
mkdir ~/Sites/hello
echo "Hello, World!" > ~/Sites/hello/index.html
and go to
http://localhost/~username/hello/
bash <(curl -Ls http://git.io/eUx7rg)
vi ~/.bash_profile
and add the following aliases:
alias mysqlstart='sudo /usr/local/mysql/support-files/mysql.server start'
alias mysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop'
alias mysqlrestart='sudo /usr/local/mysql/support-files/mysql.server restart'
...
mysqlstart
mysql -u root -p
And create a database
create database DB_NAME;