Closed vravish closed 7 years ago
Looks like lua can't verify google.com
cert with /etc/nginx/certs/SOMETHING.ca.crt
. Does it work with the default /etc/ssl/certs/ca-certificates.crt
?
Hi @bobrik,
Thank you for your response. When I try it with the lua_ssl_trusted_certificate
statement pointing to the default .cert
file, I am able to load the URL in https. But my browser reports that "Your connection to this site is not fully secure".
And when I try it with the lua_ssl_trusted_certificate
pointing to the default .cert
file and comment out the ssl_certificate
and ssl_certificate_key
statements, I see the error:
2017/08/13 05:21:28 [error] 8#0: *1 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 10.132.0.68, server: 0.0.0.0:443
Is this a problem with the SSL certificate and key, or another problem with my NGINX configuration file? Please let me know.
As I found out today, when I use my certificate as lua_ssl_trusted_certificate
, even though I see the error regarding the issuer and a "403 Forbidden" message from NGINX, my browser says that the connection is secure, meaning that my SOMETHING.crt
file was a good certificate. Is this still a problem with the .cert
file? Please note that in the scenario which I had originally described, I was using a file called SOMETHING.ca.crt
, and now I am using one called SOMETHING.crt
(not .ca.crt
). Please let me know of any problems you see here.
lua_ssl_trusted_certificate
has no effect on your browser saying "Your connection to this site is not fully secure". You see 403, because lua can't verify connection to google:
This is where lua_ssl_trusted_certificate
is used.
You most likely want:
lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
This allows lua code to verify Google certificates.
ssl_certificate /etc/nginx/certs/SOMETHING.pem;
ssl_certificate_key /etc/nginx/certs/SOMETHING.key;
This allows your browser to verify your own certificate.
Hello,
When I use the Docker image for nginx-google-oauth, everything works fine when I do not use SSL. However, when I use SSL, I see the error:
I have set the PORT environment variable to
443 ssl
, as just443
does not enable SSL. I am also using a custom version of/etc/nginx/sites-available/default
, which is below:I merely changed it to include the
ssl_certificate
andssl_certificate_key
statements. My Dockerfile addsSOMETHING.ca.crt
,SOMETHING.pem
, andSOMETHING.key
to the/etc/nginx/certs/
directory. Please let me know if you see any issues, or if I need to do anything else. I have also tried not including thessl_certificate
or thessl_certificate_key
statements, but this did not work either.