Please, I change my network interface, which resulted in an IP change, and now my Nginx web server won’t start. I need help. I have added the new IP in the networks settings
systemctl status Nginx
it give me “Unit Nginx.service could not be found.”
Use nginx instead of Nginx
systemctl status nginx
Ok now I get this
× nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2023-08-06 13:55:24 WAT; 8min ago
Docs: nginx documentation
Process: 38007 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
CPU: 13ms
Aug 06 13:55:24 fs2.disk.ng systemd[1]: Starting nginx - high performance web server…
Aug 06 13:55:24 fs2.disk.ng nginx[38007]: nginx: [warn] the “listen … http2” directive is deprecated, use the “http2” directive instead in /etc/nginx/conf.d/167.235.96.232.conf:37
Aug 06 13:55:24 fs2.disk.ng nginx[38007]: nginx: [emerg] bind() to 167.235.34.72:80 failed (99: Cannot assign requested address)
Aug 06 13:55:24 fs2.disk.ng systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Aug 06 13:55:24 fs2.disk.ng systemd[1]: nginx.service: Failed with result ‘exit-code’.
Aug 06 13:55:24 fs2.disk.ng systemd[1]: Failed to start nginx - high performance web server.
Yes, it is because your old ip.
You could try to execute this command as root:
v-update-sys-ip
WARNING: Before execute above command, please, make sure you have a full backup, or better a snapshot of your system
Worked Nginx is now running, Thank you.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.