Search code examples
nginxvirtual-hostsphp

NGINX directing to /usr/share/nginx/www/html after update


Today I updated my webserver, and while I do have a backup, I wish to resolve the following issue.

After a reboot after the apt-get update and apt-get upgrade, NGINX started to ignore the virtual-hosts. The domains are still operational, but they are directed to the /usr/share/nginx/www/html/index.php file apparently, which contains: 'phpinfo();' in php tags.

The 'default' file for virtual-hosts and original conf settings are not present, only my customized nginx.conf. Therefore I have already ran out of possible issue's I can think of.


Solution

  • After the upgrade it seems that indeed some files in etc/nginx/ were changed, I replaced all files in there with my backup and it works just fine again.

    Not much of an answer maybe, but if you have a backup, than you can fix the issue. And it at least gives you a starting point as for where to look to fix the issue by hand.