Why is my server failing?

I updated Ubuntu from 16.04 to 18.04, then to 20.04.6. Now, the server is down.

root@hpcnode:~# sudo nginx -t
nginx: [emerg] open() "/etc/nginx/sites-enabled/default" failed (2: No such file exists)
nginx: configuration file /etc/nginx/nginx.conf test failed<

What do I need to do to get my server back up and running? The website is horizonpointconsulting.com

1 Reply

If you already have sites set up with NGINX, then the issue could be that the test command doesn't know where to look for your configurations. It's also possible something in the upgrade process removed a needed file or made something incompatible.

I'd recommend looking through our guide to Using NGINX on Ubuntu 20.04. Based on that guide, your configuration file for your site should be located in /etc/nginx/sites-available/, likely as a file called /etc/nginx/sites-available/horizonpointconsulting.com. It's possibly named something different as you would have named this during configuration.

You could also cat out the contents of that file to make sure it's properly pointing to your root directory and index file and that those files are still present and that the content is still there. Again, that guide should help you find those, but they are typically located in the '/var/www/' directory.

There is more help in that guide, but I think I would start by using that as a map for where to look for configurations that you already made. If you're able to find the configuration files for your site, you should be able to make any changes needed to get them in the right place.

These guides may also help:

Finally, in the future I'd recommend using the Clean Install method for upgrading. It's a bit more work to set up, but it leads to fewer issues in the long term from what I have seen.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct