I have 3 server with 1 Vestacp and the other myVestaCp and I am having the same problem for all my server.
I install myVestaCP with nginx + php-fpm and in the server i only run wordpress website.
Following the example from nginx and wordpress, I need to add;
Code: Select all
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
So what happen was, after few months, the configuration in nginx file (e.g example.com.nginx.conf and example.com.nginx.ssl.conf) will revert to original without the code above.
When this happen my permalinks fail to work and any navigation will send my website to 404 page.
I am wondering if there is a solution to this.
Thanks.