Native way to setup web environment for Mac.
This script will install and setup Nginx + MySQL + PHP through Homebrew.
curl -L https://raw.github.com/mrded/brew-emp/master/tools/install.sh | bash
curl -L https://raw.github.com/mrded/brew-emp/master/tools/uninstall.sh | bash
curl -L https://raw.github.com/mrded/brew-emp/master/tools/update.sh | bash
brew-emp [start | stop | restart]
For example let's create virtual host for Drupal 'mysite'.
Copy Drupal preset:
cp /usr/local/etc/nginx/sites-available/drupal.local /usr/local/etc/nginx/sites-available/mysite.local
Change name and path to site:
vim /usr/local/etc/nginx/sites-available/mysite.local
server {
listen 80;
server_name mysite.local;
root /Users/mrded/Sites/mysite;
access_log /usr/local/var/log/nginx/mysite.access.log;
error_log /usr/local/var/log/nginx/mysite.error.log;
include /usr/local/etc/nginx/common/drupal;
}
Enable virtual host:
ln -s /usr/local/etc/nginx/sites-available/mysite.local /usr/local/etc/nginx/sites-enabled/mysite.local
Add 127.0.0.1 mysite.local
to /etc/hosts
.
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
MySQL: /usr/local/mysql/etc/my.cnf
- launchrocket - a PrefPane to manage all your Homebrew-installed services.
- Hosts.prefpane - a PrefPane to manage /etc/hosts