i'm trying to understand what i don't know, why MAMP cannot work on port 80 when documents dir is on removable hdd.
I'll try to explain the behavior.
I have installed MAMP on mac os 12.5.1, set apache port on 80 and apache documents folder in an external drive.
When i try to access to localhost i receive 403 status.
Apache log said:
1)Operation not permitted: [client 127.0.0.1:49708] AH00132: file permissions deny server access:
Then i started to try to get MAMP work on port 80 when the documents dir is in an external drive, because it work correctly if the documents folder is the default MAMP dir ( /Applications/MAMP/htdocs )
I tried to grant full disk access, nothing change, tried to set dir group in external and removable drive to _www, same above, nothing change, changed file permission, etc.
I figured out i can solve my problem only executing apache from terminal with super user privileges
sudo /Applications/MAMP/bin/startApache.sh
If some httpd process already started, simply i kill it and then execute startApache.sh.
To get MAMP working using documents dir on external removable drive i execute first
sudo killall httpd
and
sudo /Applications/MAMP/bin/startApache.sh
.
I thinks is a problem related to Mac SIP.
My question is: there is a way to grant permission to MAMP on removable device ?
I tried also to write a really simply applescript that do above shell script with sudo but not working, apache start but doesn't working, same 403 status using port 80. Meanwhile it's work on port 8888.
This is the very simply applescript i wrote to do the same i do from terminal:
set complete_start to false as boolean
try
do shell script "sudo /Applications/MAMP/bin/startApache.sh" with administrator privileges
set complete_start to true as boolean
end try
if complete_start then
display dialog "Apache start"
else
display dialog "Something wrong"
end if
return
I'm getting crazy figuring out this situation, i think it's only a sip related question, and i cannot understand how i can grant access to removable device with right permission to use mamp with a documents dir on an external drive.
Hoping someone have patience to drive me in the right way.
Thank in advance.