WordPress added support for nginx and permalinks in 3.7, so some of that article is out of date.
However, WordPress won’t write an nginx config file for you, because it doesn’t know your setup or where to put the config files. Unlike Apache, an .htaccess file in the directory is not quite a standard for nginx.
An extensive config file is here:
http://codex.wordpress.org/Nginx#General_WordPress_rules
However most of that is really unnecessary for a basic nginx configuration. The rule could be as simple as this in the relevant server block:
location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}
Everything other than that is more or less prettification or rewrites for personal tastes (blocking annoyances, things like that).
Dreamhost, for example, recommends something like this:
http://wiki.dreamhost.com/Nginx#Permalinks
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
Which works but might be a tad slower.
The rules get more complex for things like multisite and such.
Where should I put that line of code? (this:
location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}
)
@thomas040ehv
In your /etc/nginx/sites-available/*configfile*