[BUG] Cannot disable Proxy Mode and add "location /" to additional nginx directives simultaneously: nginx: [emerg] duplicate location

Follow

Comments

4 comments

  • Avatar
    Sven Janssen

    This used to work for me but now for some reason it does not anymore. When I check /var/www/vhosts/system/example.com/conf/vhost_nginx.conf it does not contain location / directive and thus it does work. But I still get an email with plesk wanting to regenerate the files and a message on the "home" dashboard as well.

    I think the reason for try-to-fix-but-instead-really-messed-up is PPPM-6752.

    0
    Comment actions Permalink
  • Avatar
    Anzhelika Khapaknysh

    @Sven Janssen,

    If you still experience any issues, please submit a request to our Plesk Technical Support so they may check the issue thoroughly.

    0
    Comment actions Permalink
  • Avatar
    Sven Janssen (Edited )

    Well unfortunately I got Plesk via my provider and cannot submit a ticket. The problem still persists.

    To get an override for location /, I uncheck the "proxy" and cut the directive so it is empty and hit apply. Then I paste the directive and hit okay. Everything works until plesk regenerates the configs for whatever reason and then it breaks.

    OSDebian 9.12, ProductPlesk Obsidian
    Version 18.0.25, last updated on Mar 20, 2020 02:32 PM

    Message says:

    New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/domain.tld/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter

     

    nginx:

    location / {
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_pass http://localhost:1234;
    autoindex off;
    }

    0
    Comment actions Permalink
  • Avatar
    Francisco Garcia

    Hi Sven Janssen,

    Then you must be able to open a support request to your provider about Plesk or get a Support subscription.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request