apachemampmixeddrives

MAMP htdocs on different drives


So I upgraded my MacBook Pro to use an ssd + hdd mixed drive setup. Before my mixed drive setup, MAMP and htdocs sat in the root Application folder. Now, I want MAMP to be able to stay in the root folder on my ssd but read the web apps that will be located in the hdd. I've tried to go into MAMP preferences > apache and set the directory for htdocs into the other volume but it doesn't seem to work. Is this even possible or is there another solution that I am unaware of?


Solution

  • Virtual Hosts
    You can do it manually per host in httpd.conf

    e.g.

    <VirtualHost *:80>
    ServerName example.dev
    DocumentRoot "/Users/joe/webroot/dangermoose.dev"
    </VirtualHost>
    

    Read this | Step 3 – Virtual Host
    and more useful hints.