I am running MAMP PRO 6.8.1 on a MacBook with a M1 chip running macOS X Ventura 13.2.1.
The default index.php page for the 'localhost' Host loads fine when I click the "Open" button for that site.
However, when I click the "Open" button for the new Custom site I created, instead of opening the site, it downloads the index.php page. Using the "Open" button opens a browser tab to https://[my-new-host-name]:8890
In case there was something wrong with my custom site or its index.php page, I renamed index.php to index_old.php and put a copy of the MAMP - provided index.php file from 'localhost' into my new host folder. Same problem - instead of loading the index.php file in a browser window, it downloads the file.
Tried with both Firefox and Chrome.
I tried changing the index.php file, and I tried different browsers, and I tried disabling the SSL certificate. Nothing changed.
In this case the failure to load was because there was an old .htaccess file in the folder from when the site was on cPanel hosting. I deleted the .htaccess file and now the site loads.
The answer was provided to me by Dirk Einecke on the MAMP Pro Bugbase website.
After deleting the .htaccess file, I was then able to rename the index.php files to restore my original index.php file, and then the site came up. Problem solved.