Fix Nginxcp errors in WHM, conflicting server name, Address already in use

Some configurations using nginxcp in whm may see the following errors when starting/restarting WHM:

[plain]nginx: [warn] conflicting server name “YOURIPADDRESS” on 66.228.117.248:80, ignored
nginx: [warn] conflicting server name “YOURIPADDRESS” on 66.228.117.248:80, ignored
nginx: [warn] conflicting server name “YOURIPADDRESS” on 66.228.117.248:80, ignored

nginx: [emerg] bind() to YOURIPADDRESS:80 failed (98: Address already in use)
nginx: [emerg] bind() to YOURIPADDRESS:80 failed (98: Address already in use)
nginx: [emerg] bind() to YOURIPADDRESS:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
already running.[/plain]

Make these changes to fix it: (in your shell).

[plain]cd /etc/nginx/vhosts[/plain]
[plain]perl -pi -w -e ‘s/server_name(.*) YOURIPADDRESS/server_name$1/g;’ *[/plain]

Replace YOURIPADDRESS with the ip address you see in the errors.

Now go to WHM > Tweak settings and change Apache non-SSL IP/port to 0.0.0.0:8081

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *