Wordpress Permalink change Causes site to load perfectly but posts give 404 not found nginx.
The problem gets solved by adding the following to config:
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?q=$uri&$args;
#try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
Note: This problem occurs with fresh installations of wordpress as well.
Is it possible to fix it so that it does not need to be added to every time I add a site?