WordPress SEF Links and Virtualmin with Nginx

I followed the folowing direction to get SEF permalinks in WordPress but to no avail:

  1. Login to Virtualmin and go Webmin > Servers > Nginx Web Server.

  2. Click Edit Configuration Files button.

  3. Locate this block of code in /etc/nginx/nginx.conf:

location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/php-nginx/14918980478094.sock/socket;

and add this just below it:

location / {
try_files $uri $uri/ /index.php?$args;

  1. Click Save

  2. Go to Virtualmin > Servers Status and click Restart button for Nginx Webserver.

I have done this over and over with the same 404 error. What is the correct setting in Virtualmin.

Can anyone help with this?