User Tools

Site Tools


macos_lamp

MacOS Lamp install

Install repos and unlink default php

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew unlink php56

Install required Software

brew install php70 --with-httpd24
brew reinstall php70 --with-httpd24

Unload macos' system apache

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

General config

atom /usr/local/etc/apache2/2.4/httpd.conf

Add PHP7 Module

Path depends on your installed PHP Version!

LoadModule php7_module        /usr/local/Cellar/php70/7.0.19_11/libexec/apache2/libphp7.so

Allow php mime type in <IfModule mime_module>

AddType application/x-httpd-php .php .phtml .php3

Config for Extra vHosts:

atom /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf

HTDOCS

ls -la /usr/local/var/www/htdocs/
## Local DNS
brew install dnsmasq
sudo brew services start dnsmasq

sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'

https://getgrav.org/blog/macos-sierra-apache-mysql-vhost-apc


## Notes about installing mysql/mariadb should go here ...




complete -cf sudo

## Notes about installing mysql/mariadb should go here …

macos_lamp.txt · Last modified: 2017/08/08 11:04 by admin