open() /etc/nginx/nginx.conf failed

open() /etc/nginx/nginx.conf failed

Hi,

I have installed nginx on Ununtu 18.04 but then un installed. After that deleted /etc/nginx/ directory.

Then again installed nginx with following command:

sudo apt install nginx

But when I am restarting it exits with following error:

Apr 04 17:29:34 bugs-VirtualBox nginx[2880]: nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
Apr 04 17:29:34 bugs-VirtualBox nginx[2880]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 04 17:29:34 bugs-VirtualBox systemd[1]: nginx.service: Control process exited, code=exited status=1
Apr 04 17:29:34 bugs-VirtualBox systemd[1]: nginx.service: Failed with result 'exit-code'.
Apr 04 17:29:34 bugs-VirtualBox systemd[1]: Failed to start A high performance web server and a reverse proxy server.
-- Subject: Unit nginx.service has failed

How to resolve this?

Thanks

View Answers









Related Tutorials/Questions & Answers:

Ads