-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Let's Encrypt certbot instructions causes an NGiNX error #215
Comments
Same error for me today. Ubuntu 20.04 (all updates installed) |
👋 Hey folks, just taking a look at this, and I'm unable to reproduce the error it seems. This is on
I also recreated the configuration shared in this issue, and saw no issues either:
Do y'all have any extra info on at what stage things fail? From what you've provided, it looks like you're seeing the failure when reloading the config after the first |
@MattIPv4 I have used NGiNX from their Ubuntu Repo that you can see the instructions on how to install here: https://www.nginx.com/resources/wiki/start/topics/tutorials/install/ I run into an issue after running the sed command to comment out the SSL cert location. Reason being is that the listen to port 443 is left but no SSL cert is specified. |
You should be able to bind to port 443 without an SSL cert. It'd only be an issue if Would you mind sharing the exact nginx configuration file in the state that is failing to valid when restarting nginx? |
do you mean the nginx.conf file or the website conf file? |
Whichever file nginx is saying the error is in, I assume the website config file. |
it is posted in my initial post |
I have copied that file exactly onto a test machine, and it passes the nginx test/reload:
|
where did you get your NGiNX from? Ubuntu's repo or NGiNX's repo? |
I have tested this using the default nginx package from DigitalOcean's Ubuntu mirror, as well as from nginx.org/packages/mainline/ubuntu -- The DigitalOcean distributed version was |
very odd, i will try again tomorrow |
👋 Any updates here -- were you able to reproduce this when you tried again? |
@MattIPv4 sorry i have been out ill, once i will get better ill test |
I am having the same issue. for some reason nginx doesnt like it is like it assumes ssl for some weird reason |
@mcscrad Please can you share the exact nginx version being used, and the exact config being used that fails the nginx test -- |
could be. i had to change all |
I've same issue with nginx/1.19.6 on CentOS 7 |
@krugdenis Could you share your configuration in the exact state where it fails nginx validation? |
listen 443; #;# - brings nginx error |
👋 Hey folks, so I've created a PR to try and get around this issue with a couple of tweaks:
If someone who can reproduce the issue described here could test out the build preview in #240 and report back, that'd be ace! |
I'm having the same issue: nginx/1.23.2 It worked fine with a single domain setup. And now nginx complains:
Funnily enough, if the new domain is evaluated second the failure does not occur! Could have something to do with this: https://github.com/nginx/nginx/blob/master/src/http/modules/ngx_http_ssl_module.c#L1312
(no idea why though) @MattIPv4 I'm not sure if this is something that could even be handled but I thought I'd share how I reproduced it. |
Experiencing the same when adding multiple domains. Very strange - works fine with 2 domains but when I added a third, one of the first two suffers the aforementioned error.
Worked around the issue by manually updating the server block to use port 80 temporarily instead |
Details
Description
When using the instructions provided in nginxconfig.io the resulting website configuration causes NGiNX to error out.
Steps to reproduce
Setup a reverse proxy frontend website, set it to create a new certificate and run the instructions listed.
Screenshots
https://imgur.com/a/zQXXnWF
Expected behavior
Certbot should obtain the cert just fine
Error Message
OS Version
Ubuntu 20.04 (all updates installed)
NGiNX Version
1.18 (NGiNX repo)
Website configuration
The text was updated successfully, but these errors were encountered: