Native way to setup web environment for Mac.
This script will install and setup Nginx + MySQL + PHP + Redis + Composer + Drush through Homebrew.
curl -L https://raw.github.com/Happensit/My-homebrew/master/install.sh | bash
getlooky [start | stop]
For example let's create virtual host for Drupal 'customsite'.
Copy Drupal preset:
cp /usr/local/etc/nginx/sites-available/drupal.dev /usr/local/etc/nginx/sites-available/customsite.dev
Change name and path to site:
vim /usr/local/etc/nginx/sites-available/customsite.dev
server {
listen 80;
server_name mysite.local;
root /Users/Happensit/Sites/customsite;
access_log /usr/local/var/log/nginx/customsite.access.log;
error_log /usr/local/var/log/nginx/customsite.error.log;
include /usr/local/etc/nginx/common/drupal;
}
Enable virtual host:
ln -s /usr/local/etc/nginx/sites-available/mysite.dev /usr/local/etc/nginx/sites-enabled/customsite.dev
Add 127.0.0.1 customsite.dev
to /etc/hosts
.
drush dl devel
drush en devel
drush vset devel_xhprof_directory "/usr/local/Cellar/php56-xhprof/254eb24"
drush vset devel_xhprof_url "http://xhprof.dev"
drush vset devel_xhprof_enabled 1
Username: root
Password:
Port: 3306
Remote port is 9002
Nginx: /usr/local/etc/nginx/nginx.conf
FastCGI: /usr/local/etc/nginx/fastcgi.conf
PHP: /usr/local/etc/php/5.6/php.ini
Redis: /usr/local/etc/redis.conf
Xdebug: /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
xhprof: /usr/local/etc/php/5.6/conf.d/ext-xhprof.ini
Source code: /usr/local/Cellar/php56-xhprof/
MySQL: /usr/local/etc/my.cnf