title: MAMP + NGINX + WordPress = 404 error on sub pages (Permalinks not working)
body: <p><strong>The Problem</strong></p>
  
  <p>My local, MAMP powered, installation running WordPress is returning 404 errors on sub pages (the home page / front page work). I know this is because WordPress is looking for Apache's .htaccess file to ensure Permalink rules can be set, but since I've configured MAMP to use NGinx so htaccess isn't used and NGinx doesn't have the configuration to support Permalinks.</p>
  
  <p>However, my attempts to edit NGinx's configuration file to support WordPress Permalinks isn't working.</p>
  
  <p>I think my syntax is just wrong, but I'm not experienced with NGinx configuration files enough to know.</p>
  
  <p><strong>My Environment</strong></p>
  
  <p>I am running macOS Sierra (10.12) and also tested on another Mac running macOS Mojave (10.14). Both are using the current version of MAMP (free) with NGinx as the web server enabled.</p>
  
  <p>Here is my default <a href="https://gist.github.com/s3w47m88/ccdd3341e5fce8d9a4b21a98ef925204" rel="nofollow noreferrer">/Applications/MAMP/conf/nginx/nginx.conf</a> file.</p>
  
  <p><strong>Researched Solutions (Which Haven't Worked)</strong></p>
  
  <ul>
  <li>I have read numerous posts on StackOverflow (and other sources) but none seem to work or be entirely relevant for my environment.</li>
  <li>I have read <a href="https://codex.wordpress.org/Nginx" rel="nofollow noreferrer">the official WordPress documentation on Permalinks and NGinx</a> on the subject, but it's really dense so I found it hard to locate what is relevant and understand all of the concepts.</li>
  <li>And, of course, <a href="https://documentation.mamp.info/en/MAMP-PRO-Mac/How-Tos/General/SetupWPwithNginx/" rel="nofollow noreferrer">the official MAMP documentation</a>. Although this is for MAMP Pro and I copied this value into one of the configuration files I test.</li>
  </ul>
  
  <p><strong>Attempted Solutions (Which Haven't Worked)</strong></p>
  
  <p>Here are three cases I tried "try files":</p>
  
  <ul>
  <li>"<a href="https://gist.github.com/s3w47m88/14ba451488b7c10003b108a50802717a" rel="nofollow noreferrer">line 145 to 147</a>"</li>
  </ul>
  
  <p>And <a href="https://gist.github.com/s3w47m88/9b62ceedad8fb97e041e768fef5c94f8" rel="nofollow noreferrer">here</a> is one where I tried the default WordPress configuration.</p>