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!
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.