• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue nginx: configuration file /etc/nginx/nginx.conf test failed

Azurel

Silver Pleskian
My hoster have restart the server because maintenance work on his servers host system and again nginx not start after server restart. So domains are not working. After hours waiting, I take a look with

# service nginx status
Starting Startup script for nginx service...
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] bind() to <IPv6>:443 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx.service: control process exited, code=exited status=1
Failed to start Startup script for nginx service.
Unit nginx.service entered failed state.
nginx.service failed.

BUT, with
# service nginx start
its working instantly fine. What is here the problem?

I found this article Nginx does not start automatically after reboot: 99: Cannot assign requested address

My hoster had changed the file /etc/sysconfig/network-scripts/ifcfg-enp0s5
DEVICE="enp0s5"
ONBOOT="yes"
BOOTPROTO="none"
HWADDR="00:1c:XX:XX:XX:XX"
IPADDR="37.XX.XX.XX"
NETMASK="255.255.255.255"
DHCPV6C="no"
IPV6_AUTOCONF="no"
IPV6INIT="yes"
IPV6ADDR="2A01:XX..XX:0:1/128"
GATEWAY="169.XX.XX.1"
IPV6_DEFAULTGW="FEXX::FFFF:1:1"
Its really okay to use apostrophe "value" for the values? And its allowed to use uppercase for IPV6ADDR value?
 
Yes, this is all permissible. Where such doubts?
Compare syntax with content of any other files from /etc/sysconfig/network-scripts/
 
I nerver see and find in network-scripts-files values with apostrophe. That's why I asked. ;)
So I add sleep like the article suggested. I hope this helps.
 
Back
Top