Answer the question
In order to leave comments, you need to log in
Why is NGINX not working on Raspberry Pi?
Installed NGINX on Raspberry Pi. Everything worked until the device was rebooted. Now the service won't start.
[email protected]:~ $ sudo service nginx start
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
[email protected]:~ $ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-08-03 22:12:46 MSK; 9s ago
Docs: man:nginx(8)
Process: 2883 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Aug 03 22:12:46 raspberrypi systemd[1]: Starting A high performance web server and a reverse proxy server...
Aug 03 22:12:46 raspberrypi nginx[2883]: nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/default.save:22
Aug 03 22:12:46 raspberrypi nginx[2883]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 03 22:12:46 raspberrypi systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 03 22:12:46 raspberrypi systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Aug 03 22:12:46 raspberrypi systemd[1]: nginx.service: Unit entered failed state.
Aug 03 22:12:46 raspberrypi systemd[1]: nginx.service: Failed with result 'exit-code'.
Answer the question
In order to leave comments, you need to log in
You edited /etc/nginx/sites-enabled/default then something went wrong and the file /etc/nginx/sites-enabled/default.save was not deleted on save. Delete this file and you will be happy :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question