I first tryed installing nginx from the config menu of my home automation server (Openhabian). But this ended in errors. So I uninstalled nginx and removed all related directories to start over. I followed your howto about installing nginx on debian 10 but after installation is finished I get an error. I didn 't write it down, but it was vague. Then I tried systemctl status nginx:
* 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 Tue 2020-05-05 13:39:12 CEST; 11min ago
Docs: man:nginx(8)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
and 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 Tue 2020-05-05 13:52:47 CEST; 30s ago
Docs: man:nginx(8)
Process: 2822 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAIL
lines 1-5/5 (END)
Hen I go to my server-IP I do get the nginx-landing page. But when I do: ‘sudo systemctl reload nginx’
I get:
nginx.service is not active, cannot reload.
The command: ‘journalctl -xe’ gives me a lot of line that I understand nothing about and I don’t find any relation with nginx I think:
-- The unit UNIT has successfully entered the 'dead' state.
mei 05 13:38:42 HABIAN systemd[2022]: Closed GnuPG cryptographic agent (ssh-agent emulation).
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit UNIT has finished.
--
-- The job identifier is 20 and the job result is done.
mei 05 13:38:42 HABIAN systemd[2022]: dbus.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
I hope you can help me?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Most probably you’ve made a mistake somewhere in your Nginx configuration file. To check the exact error, I’ll recommend going over your Nginx error log right after trying to restart the service. The error log should provide you with the exact error it’s experiencing.
To check the error log, you can use the following command
tail -f /var/log/nginx/error.log
In another SSH window,try restarting the Nginx service and then check the log and it’s output.
With the error you have now, you should be able to go further and troubleshoot your Nginx. If you are still unable to post the error here and I’ll assist you.
Regards, KDSys
If you’re trying to start the Nginx service and encountering the error message, So the solution is, Go to Digitalocean Cloud panel and restart your server.
This may help you, If it doesn’t work, then you can remove the Nginx and install it again.
Thanks
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.