Using a symbolic link as the document root in MAMP nodes

I am using MAMP PRO v3.0.7.2

I want to specify a symbolic link as the document root for a specific entry in the MAMP Pro host section, which points to the latest version of my project, which can change many times a day during development. The problem is that when I select this symbolic link as my document root, MAMP overwrites the path to match which pointer refers to the symbolic link.

The script line for my project updates the symbolic link to point to the latest release directory for each rebuild, but MAMP still has this previous version as the document root.

So, for example, I want the document root to be:

/Users/username/Sites/projectname/live

which is a symbolic link that currently points to a directory:

/Users/username/Sites/projectname/releases/2014-10-24-17_25_52

MAMP does not respect the symlink path, but instead rewrites it to

/Users/username/Sites/projectname/releases/2014-10-24-17_25_52

So, when I rebuild the project later, MAMP still points the document root to the path above, but /live now points to

/Users/username/Sites/projectname/releases/2014-10-24-18_17_48

In the past, I configured Apache manually, and it was fine using a symbolic link as the document root, and whenever I rebuilt the project, the most recent build was resolved at the URL defined in vhosts, without having to edit anything or restart Apache

I tried to manually edit the corresponding MAMP file httpd.conf of the VirtualHost entry in the library / Application Support / appsolute / MAMP PRO / conf / httpd.conf, but whenever the server restarts, it overwrites my changes and overwrites all instances of the path back to any directory currently referenced by the /live symbolic link.

Is there a way around this so that I can specify a symbolic link as the root of the document and do I always point to that symbolic link and not the actual directory to which the link is currently symbolized? Otherwise, I have to manually change it and restart the servers many extra times a day, which gets old pretty quickly.

+7
apache symlink mamp mamp-pro
source share

No one has answered this question yet.

See related questions:

1773
How to symbolize a file in Linux?
758
Delete a symbolic link to the directory
3
Automatic virtual hosts with MAMP Pro?
3
Symlinked MAMP Folder Causeing 403 Forbidden
2
How to fix MySQL update error after updating MAMP / MAMP Pro 4 to 5
2
MAMP Apache Alias ​​always displays relative to the document root
one
Upgrading phpMyAdmin to the latest version 4.2.11 on MAMP
one
MAMP - virtual hosts do not work
0
my.cnf could not be recorded - Dropbox - Mamp Pro 2.2 - Mavericks
0
Transfer MAMP Pro to a new Mac with a new username

All Articles