Warning: "upstream" directive is not allowed here

Discussion in 'Installation/Configuration' started by fume, Oct 21, 2018.

  1. fume

    fume New Member

    I've installed Nextcloud on my server and followed these instructions for Nginx configuration. Now I'm getting a warning:
    Code:
    21.10.2018-19:36 - WARNING - Reason for nginx restart failure: nginx: [emerg] "upstream" directive is not allowed here in /etc/nginx/sites-enabled/100-mydomain.net.vhost:123
    nginx: configuration file /etc/nginx/nginx.conf test failed
    How can I solve this problem?

    I'm sorry for the many questions in the last few days. ISPConfig and Nginx is new for me and I'm still learning. ;)

    OS Ubuntu 18.04 LTS and ISPConfig 3
     
  2. fume

    fume New Member

    In my opinion is this the responsible part. Is it wrong?
    Code:
    upstream php-handler {
        server 127.0.0.1:9000;
        #server unix:/var/run/php/php7.2-fpm.sock;
    }
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Yesm this does not has to go into a vhost and PHP is configured for the vhost anyway, so you don't need it. There are several threads here in the forum about installing owncloud/nextcloud on nginx which also contain the correct nginx directives that you should use.

    The installation instructions you used are basically for standalone servers without a hosting control panel, so they collide with panels like ispconfig as they duplicate config which exists already in the website.
     
  4. fume

    fume New Member

    I saw that and tried to use only the nonexistent one. I will rework it.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

  6. fume

    fume New Member

Share This Page