The Nginx configuration is just like the default:
I couldn't find any clue about this error. Can anyone help me? Any help would be grateful. Thank You.
The Nginx configuration is just like the default:
I couldn't find any clue about this error. Can anyone help me? Any help would be grateful. Thank You.
you already have:
which means your servers are included from there (by default symlinked from
/etc/nginx/sites-available/
)http://nginx.org/en/docs/http/ngx_http_core_module.html#server
There is a server directive outside of the http section, this needs to be nested within http rather than as a seperate section. Ideally any server apart from the default should be set-up in
/etc/nginx/conf.d/$sitename.conf
.This error is also presented if the server fails to bind the IP address and port. Like if another web server is running on the specified port, for example. Configuration file testing said everything was ok.
Looking at /var/log/nginx/error.log clearly showed the problem though.