[delete] nginx restart failure: no port in upstream

Discussion in 'Installation/Configuration' started by labsy, Dec 5, 2019.

  1. labsy

    labsy Member

    How can I delete this thread? Found out the problem, it was typo in config file, useless for community.

    Hi community,
    When I make changes to ISPConfig under SYSTEM --> SERVER CONFIG, I get warning via e-mail:

    05.12.2019-12:23 - WARNING - nginx did not restart after the configuration change for website somewebsite.si. Reverting the configuration. Saved non-working config as /etc/nginx/sites-available/somewebsite.si.vhost.err
    05.12.2019-12:23 - WARNING - Reason for nginx restart failure: nginx: [emerg] no port in upstream "..." in /etc/nginx/sites-enabled/100-somewebsite.si.vhost:106
    nginx: configuration file /etc/nginx/nginx.conf test failed

    I tested /etc/nginx/nginx.conf file, but it passes OK.
    But the somesite config did not:
    nginx -c /etc/nginx/sites-available/somesite.si.vhost.err -t
    nginx: [emerg] "server" directive is not allowed here in /etc/nginx/sites-available/somesite.si.vhost.err:1
    nginx: configuration file /etc/nginx/sites-available/somesite.si.vhost.err test failed
    I do not understand.
    One error was "no port in upstream", while testing revealed ""server" directive is not allowed here".
    I look at that file, and it is the same structure and has only ONE "server" directive, like all other web sites - at the beginning:
    server {
            listen ssl;
    Actually, the same error ""server" directive is not allowed here" I get when testing ANY config file on this server under /sites-available/. So I guess nothing is wrong with config files.

    Any idea what's the issue here?
    Last edited: Dec 5, 2019

Share This Page