https://www.digitalocean.com/community/questions/enabling-nginx-mod_rewrite
https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/
open the file below replacing ‘default’ if necessary with the sites server block:
$ sudo nano /etc/nginx/sites-available/default
Replace:
try_files $uri $uri/ =404;
with:
try_files $uri $uri/ /index.php?$args;
If using a subfolder (say /wordpress), you’ll have to add an extra location /wordpress/ block to your configuration file :
location /wordpress/ { try_files $uri $uri/ /wordpress/index.php?$args; }
Restart nginx:
$ sudo service nginx restart
ERRORS
Above is not working for local development. Also tried adding below code (underneath the ‘try_files…’ code and within the server block):
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
Hosting
Develop and scale your apps globally with DigitalOcean and/or Vultr – or use shared hosting with no server maintenance required at iMarketHost.com.
Installation & Maintenance
If you would like to get this app installed, maintained or need training, Contact Me to get current rates.