title: WordPress links showing 404 after a day, each day
body: <p>I recently moved my WordPress site from DreamHost to AWS, I have EC2 Ubuntu instance with mod_rewrite and ssl installed (and PHP7 and other dependencies). </p>
  
  <p>My site was working 100% first 20ish hours, and then all pages went down, that is all permalinks to those pages were showing 404 not found page. </p>
  
  <p>I went to Settings -> Permalinks and just hit "Save" and it started working again. But after again maybe 15-20 hours links went down, again I went just hit save and it started to show pages again.</p>
  
  <p>Third day I decided to delete .htaccess and went to Settings -> Permalinks and just saved. It again worked only for like 20 hours or less and then again starte showing 404.</p>
  
  <p>Anyone has any idea how to fix this? It is really annoying and frustrating. The .htaccess file is not being "modified" it's showing same contents as normal would but pages do not work until I go and click on save on Settings -> Permalinks.</p>