MAMP Pro
Settings
Hosts
General
- Set the host name like a URL. Example:
something.test
- Set the document root.
SSL
- Generate a certificate.
- Add and trust the certificate in your Mac’s keychain. Instructions
Automatically redirect HTTP to HTTPS:
Allow HTTP connections |
Ports
Apache | 80 (443 SSL) |
---|---|
Nginx | 81 (7443 SSL) |
MySQL | 3306 |
Memcached | 11211 |
Languages
PHP
Default version | 5.6.37 |
---|---|
Mode | Identical PHP for all hosts |
PHP cache | Off |
Apache configuration
- Go to
File > Edit Template > Apache > httpd.conf
. - Add to the bottom:
# -----------------------------------------------
# GravDept:
# Enable GZIP
# -----------------------------------------------
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
Error logs
/Applications/MAMP/logs/apache_error.log
/Applications/MAMP/logs/mysql_error_log.err
/Applications/MAMP/logs/php_error.log
Database management
Import / export
See Workspace > Mac Apps > Sequel Pro.
Assign existing user to imported database
In phpMyAdmin:
- Click
Home
icon. - Click
User accounts
tab. - Click
Edit privileges
link for the user. - Click
Database
tab. - Select the database from the multi-select input.
- Check all privileges.
- Click
Go
.
Assign global priveliges to a user
Sometimes importing a database requires global priveliges. I’m not sure why, but I don’t worry about it for a local
environment.
In phpMyAdmin:
- Click
Home
icon. - Click
User accounts
tab. - Click
Edit privileges
link for the user. - The
Global
tab is selected (default view). - Check all privileges.
- Click
Go
.