Nginx 500 Internal Error on random sites when deleting a site (Wordpress sites)
short description
When I delete a site from the web GUI, the vhost file (/etc/nginx/sites-enabled/*.vhost) of many other sites get modified and nginx report a 500 internal server error when browsing these sites except on the index. Seems that a 'location { [..] }' section get deleted.
correct behaviour
When I delete a site, the other sites should be ok ;)
environment
Server OS: Debian
Server OS version: 9
ISPConfig version: 3.1.11 (also from 3.1.8)
proposed fix
To solve the problem insert in /etc/nginx/sites-enabled/sitename.vhost
location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php?q=$1 last;
}