• NGINX issue with ecdsa certificate


    TechKnowCase
    • Minor

    Hello all,

     

    I have encountered a bug with Unraid, where emhttpd has issues creating the nginx config file when using a ecdsa-with-SHA512 certificate (RSA certs do not seem to have this issue). This cert was self signed with a CA trusted on a few of my devices. After a bit of digging, I saw that running the nginx command gave the following error:

     

    nginx: [emerg] invalid number of arguments in "return" directive in /etc/nginx/conf.d/emhttp-servers.conf:39

     

    At line 39, we can see the following (where XYZ Unraid is the CN of the certificate) :

    server {
        #
        # Redirect http requests to https
        #
        listen *:80 default_server;
        listen [::]:80 default_server;
        return 302 https://XYZ Unraid:443$request_uri;
    }

     The issue, in the meantime, can be fixed by replacing XYZ Unraid with $host:

    server {
        #
        # Redirect http requests to https
        #
        listen *:80 default_server;
        listen [::]:80 default_server;
        return 302 https://$host:443$request_uri;
    }

    And then running nginx command again to apply the changes

     

    Anyone who has a better idea of how this nginx file is created can take a look at this issue?

     

    Thanks!

    unraid SSL.jpg

    unraid_bug_1.png

    unraid_bug_2.png




    User Feedback

    Recommended Comments

    There are no comments to display.



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.