Welcome! Log In Create A New Profile

Advanced

Re: AW: nginx-1.23.3 on Win Server wth HTTPS

All files from this thread

File Name File Size   Posted by Date  
bak.nginx.conf 2.7 KB open | download Kappes, Michael 01/18/2023 Read message
Maxim Dounin
January 18, 2023 02:32PM
Hello!

On Wed, Jan 18, 2023 at 12:41:32PM +0000, Kappes, Michael wrote:

> My "correct certificate information" is the Problem. Nginx tells me:
>
> invalid number of arguments in "ssl_certificate" directive in C:\nginx\nginx-1.23.3/conf/nginx.conf:102
> (please note: "\" and "/" in the same path?!)

This works fine, since Windows interprets both "\" and "/" in
places (including the functions nginx uses).

> C:\nginx\nginx-1.23.3\cert\ => here a my cert and key files
> At my nginx.conf file (the syntax) =>
>
> ssl_certificate C:\nginx\nginx-1.23.3\cert\1-Servername.cert.pem;
> ssl_certificate_key C:\nginx\nginx-1.23.3\cert\1-Servername.cert.key;

When using "\" in nginx configuration, you have to be careful to
properly escape it, since "\" is also an escape character, and,
for example, "\n" will be interpreted as a newline character. As
such, using "/" is usually easier.

On the other hand, this particular issue does not explain why you
are seeing the "invalid number of arguments" error, it should be
"cannot load certificate" with a garbled certificate path instead.

The "invalid number of arguments" error suggests you've typed
multiple arguments in the directive (instead of just one it
accepts). This usually happens if a space character is
accidentally used where it shouldn't, but in the directives as
shown certainly there are no extra space characters.

Most likely, there is an issue with the text editor you use, and
it's somehow inserts some additional non-printable characters,
such as byte order mark or something like that, and this confuses
nginx.

What editor do you use? Is using another one and re-typing the
directives) makes a difference? E.g., Notepad is usually
available on Windows and does not seem to corrupt text files.

[...]

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx-1.23.3 on Win Server wth HTTPS Attachments

Kappes, Michael January 18, 2023 03:52AM

Re: nginx-1.23.3 on Win Server wth HTTPS

Francis Daly January 18, 2023 06:04AM

AW: nginx-1.23.3 on Win Server wth HTTPS

Kappes, Michael January 18, 2023 07:42AM

Re: AW: nginx-1.23.3 on Win Server wth HTTPS

Maxim Dounin January 18, 2023 02:32PM

AW: AW: nginx-1.23.3 on Win Server wth HTTPS

Kappes, Michael January 19, 2023 05:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 320
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready