server {
listen 80;
root /Users/admin/htdocs/vax-uk;
index index.php index.html index.htm;
server_name vax.local;
access_log /usr/local/etc/nginx/logs/vax_access.log;
access_log /usr/local/etc/nginx/logs/vax_error.log;
Xcode
Make sure you have the latest version of XCode installed. Available from the AppStore.
Install the Xcode Command Line Tools:
xcode-select --install
Homebrew
Homebrew is the missing package manager for OSX. Download and install using the following command:
To stop the built-in Apache server in Mac OS X, use this command:
sudo apachectl -k stop
Then just enter your administrator password. And to prevent Apache from coming up again on if your system reboots/restarts just run this launchctl unload command; you’ll need your administrator password again:
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
When that’s all done, check the output of sudo lsof -i:80
and the built-in Apache web server in Mac OS X should be completely stopped and disabled.
In /usr/local/etc/nginx/sites-enabled/magento2.conf
:
server {
listen 80;
server_name magento2.local;
set $MAGE_ROOT /Users/admin/htdocs/magento2;
include /usr/local/etc/nginx/snippets/magento2.conf;
}
sed -i -e 's/DEFINER=`root`@`10.%`/DEFINER=CURRENT_USER/g' filename.sql |
* | |
!/.gitignore | |
!/robots_staging.txt | |
!/app | |
!/app/*/ | |
!/app/code/** | |
!/app/design/** | |
!/app/etc/config.php | |
!/app/i18n/** | |
!/auth.json |
Set up your global core.excludesfile
configuration file to point to this global ignore file.
git config --global core.excludesfile '~/.gitignore_global'
- SSH Key
If you don’t (yet) have a SSH-key on your local workstation you need to create one. A SSH-key provides a safe way to connect with another computer. It exists of two parts: a private and a public key. The private key is stored on your local workstation, and the public key is put on the machine you wish to connect with. To create a SSH-key on your local workstation you must enter the following command:
$ ssh-keygen -t rsa -C 'name@domain.com'
$ ssh-keygen -t rsa -C 'name@domain.com'
```
Of course you fill in your own e-mail address here. A couple of questions are asked like where to store the key and which password you want to use.
With the next command you can read your public key (and copy/paste it to your clipboard):
# Varnish environment configuration description. This was derived from | |
# the old style sysconfig/defaults settings | |
# Set this to 1 to make systemd reload try to switch vcl without restart. | |
RELOAD_VCL=1 | |
# Main configuration file. You probably want to change it. | |
VARNISH_VCL_CONF=/etc/varnish/default.vcl | |
# Default address and port to bind to. Blank address means all IPv4 |
[xdebug] | |
zend_extension="/usr/local/opt/php70-xdebug/xdebug.so" | |
xdebug.remote_enable=true | |
xdebug.remote_host=localhost | |
xdebug.remote_port=10000 | |
xdebug.remote_handler=dbgp |