Last active
August 29, 2015 14:17
-
-
Save kylejohnston/c004668f03eea27cd306 to your computer and use it in GitHub Desktop.
MAMP Configuration Tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Tags: #reference #mamp #hosting #server | |
| # Fix for MAMP when MySQL is not starting | |
| If you get the “Error: Could not connect to MySQL server!” notice, here’s a fix: | |
| 1. Quit MAMP | |
| 2. Open the terminal and type: killall -9 mysqld | |
| 3. Restart MAMP | |
| [Source](http://twob.net/journal/fix-for-mamp-mysql/) | |
| --- | |
| # Setting Up Virtual Hosts | |
| **1. Edit 'hosts' file in Terminal:** | |
| sudo pico /etc/hosts | |
| Edit 127.0.0.1 – add appropriate domain name (e.g. mysite.local) | |
| Control-o, return | |
| Control-x | |
| **2. Edit file: /Applications/MAMP/conf/apache/httpd.conf – Add VirtualHost entry:** | |
| `<VirtualHost *`> | |
| DocumentRoot ~/Sites/path-to-directory | |
| ServerName mysite.local *<– edit to reflect appropriate domain name* | |
| Order allow,deny | |
| Allow from all | |
| `</VirtualHost`> | |
| **3. Restart MAMP (Apache)** | |
| [Source](http://brassblogs.com/tutorials/setting-up-virtual-hosts-on-mamp) | |
| ## Note | |
| In OS X Yosemite, '.local' is reserved for the system, so specify some other fictional extension (.foo, .zzz, .lcl, etc.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment