Maybe the best result you can get if you use multipass (https://multipass.run) by Canonical.
It's not a really mac-way, but for me it was much easier to setup all my web development in virtualized ubuntu by well known (for me) ways.
It's very easy, you just install it and have a real webserver on your Mac. Just install nginx, php and acces to it by VM's IP.
For me it works really well
чт, 2 дек. 2021 г. в 03:16, JEFFRY KILLEN <jekillen@xxxxxxxxxxx>:
Hello;
I have a new Mac mini with Big Sur and I see in the phpinfo script that
php is no longer going to be included by default in the built in Apache
server on MacOS.
Can I get some advice on how best to install php beyond the current
version the comes with Big Sur?
I am aware of Macports
and home brew and MAMP.
But I have not dealt with macports or home brew.
I do have a MAMP installation on one of my older
iMacs.
I have experience with FreeBSD and have compiled
and installed the various resources from source code
to make a dev server and even self hosting several
FreeBSD servers.
I also have installed from FreeBSD ports but that was
more problematic than compiling and installing from
source even though it was far less work.
I would also need php CLI as I have written some CLI
scripts.
Thank you for time and attention:
JK