Does anybody suceeded on setup Magento2 and MAMP's nginx? I'm using MAMP PRO 4.1.1 and didn't realize how MAMP works with the rewrites and rules we config for each site, or if there's a way to debug and see the final used nginx config.
I would appreciate if anybody shares the config for Magento2 on this screen.
Thank you.
I just ran into this issue and for me it was that my hosts had both "Apache" and "Nginx" selected. What was weird is that I was unable to change it, so I had to create a new host with just NGINX selected and it worked.
You may also need to setup NGINX "try_files" under the NGINX tab like so: $uri $uri/ /index.php?$args
Also This link provided some more helpful info.
It's been 2 years since I posted the question, and some of the answers here helped to figure out how to configure Nginx + Magento 2 + Mamp Pro.
Here is my final configuration that worked with Magento 2.3.0 with SSL on local.
Under the Nginx
tab, I've added:
$uri $uri/ /index.php?$args
Under nginx config:
Under Ports:
Final Result:
I don't know which of these configurations are really necessary, and which one are (maybe) incorrect. However, my M2 is now working very well on MAMP PRO 5.3.
Next step is to make mamp support HTTP/2 and make Magento 2 even faster on local.
A huge thank you for those who replied earlier. Your answers helped me to solve some parts of the puzzle. I'm glad to be sharing the whole solution with you now.
If it doesn't work for you, keel an eye on MAMP Nginx log. It may bring some useful information about what's wrong.
You have to turn off "Use Nginx as a Reverse Proxy for Apache", otherwise, you need to turn on your Apache to work with nginx.
Screenshot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With