Unable to add "location /" to additional nginx directives for domain in Plesk: nginx: [emerg] duplicate location "/"

Follow

Comments

7 comments

  • Avatar
    Marco Marsala

    There is a bug: after deselecting checkbox Proxy mode, you must hit Save or Apply, and only after this step, you can add the directives, and save or apply again.

    If you deselect the checkbox and add the directives in the same step, without an intermediate save or apply operation, you'll still get the error.

    0
    Comment actions Permalink
  • Avatar
    Artyom Volov

    Hello @Marco Marsala,

    Thank you for the feedback!

    This behavior was reproduced in a test environment.

    Currently, a request to the Development Team was created to clarify the nature of it.

    We will update you as soon as we get any new information.

    0
    Comment actions Permalink
  • Avatar
    Artyom Volov

    Hi @Marco Marsala,

    This behavior was confirmed as a product bug with ID PPPM-9841, thank you for bringing our attention to it!

    You can subscribe to the article below to get a notification when the bug will be fixed.
    https://support.plesk.com/hc/en-us/articles/360014425974

    As for a workaround - just disable Proxy Mode, save changes then insert the necessary directives and save changes again.

    0
    Comment actions Permalink
  • Avatar
    Marco Marsala

    Not authorized to see the URL

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Marco Marsala
    Please try again, it should be visible now.

    0
    Comment actions Permalink
  • Avatar
    Peter (Edited )

    I can define a custom `location /` but it will never match because the default nginx.conf contains:

     

    location ~ /$ {
        index "index.html" "index.cgi" "index.pl" "index.php" "index.xhtml" "index.htm" "index.shtml";
    }

     

    This will obviously match first, is there a way to disable this directive?

    0
    Comment actions Permalink
  • Avatar
    Konstantin Annikov

    @Peter, 

    The issue you are speaking about, is described in this article. And in resolution section you could find that this default configuration could be overwritten using custom configuration templates

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request