In short, you should let NGINX know that if this file does not exist, so as not to throw a 404 error, but rather call index.php . Wordpress is smart enough to parse URLs as parameters and execute the correct page.
Add this snippet to the server configuration block:
location / { try_files $uri $uri/ /index.php?$args; }
Here is a complete example from nginx.org :
# Upstream to abstract backend connection(s) for php upstream php { server unix:/tmp/php-cgi.socket; server 127.0.0.1:9000; } server {
source share