MAMP Localhost

Multisite Subdomains

The following instructions support:

  • WordPress Multisite Installation
  • Subdomains on localhost with SSL
  • MAMP Pro

How to

Add the following, and update your configuration in MAMP Pro under:

Hosts > {your host} > Apache > Additional parameters for <VirtualHost> directive

<VirtualHost *:80>
    ServerName dev.multisite
    ServerAlias *.dev.multisite

    <Location "/">
        Redirect permanent "https://%{HTTP_HOST}%{REQUEST_URI}"
    </Location>
</VirtualHost>

<VirtualHost *:443>
    ServerName dev.multisite
    ServerAlias *.dev.multisite

    SSLEngine On
    SSLCertificateFile /path/to/your/Applications/MAMP/Library/OpenSSL/certs/dev.multisite.crt
    SSLCertificateKeyFile /path/to/your/Applications/MAMP/Library/OpenSSL/certs/dev.multisite.key
</VirtualHost>
    Upload file