Unable to Start nginx and configure to startup automatically

Posted on

I am setting up a private automation hub in a disconnected environment, but when i run my setup.sh, when it reaches the task of
TASK [ansible.automation_platform_installer.nginx : Start nginx and configure to startup automatically] ***
An error message appears as such
{"changed": false, "msg": "Unable to start service nginx: Job for nginx.service failed because the control process exited with error code.\nSee \"systemctl status nginx.service\" and \"journalctl -xe\" for details.\n"}

running systemctl status nginx.service gave me this.
a duplicate default server for xxx.xxx.xxx.xxx:443 at /etc/nginx/conf.d/automation-hub

I did a grep -R /etc/nginx/conf.d/ and there were multiple default_server
/etc/nginx/conf.d/automation-hub.nginx.conf: listen 443 default_server deferred ssl ;
/etc/nginx/conf.d/automation-hub.nginx.conf: listen 80 default_server;

How can i rectify this?

Responses