MAMP htdocs on different drives

1.7k views Asked by At

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?

3

There are 3 answers

0
avarx On BEST ANSWER

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.

0
YuriiMy On

You cannot change the installation path. But you can change the path of the main folder where the projects are stored.

Open Mamp > Preferences > Server > Сhoose where the new project folder will be > Just open the newly created folder and delete index.html

enter image description here

It is not necessary to delete the old folder in which there are already projects. You can switch between folders before starting the server

0
user3593146 On

If you are using the standard MAMP (3.0), the htdocs folder is located in /Applications/MAMP/htdocs. Delete the folder and replace it with a symlink to wherever you like. You might also copied the two files in the original directory to their new home.