[SOLVED] Certbot won't connect, wrote .well_known


#1

Please fill out the fields below so we can help you better.

My domain is:

I ran this command:

It produced this output:

My operating system is (include version):

My web server is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):


#2

My domain is: bsidesslc.org

I ran this command: ./certbot-auto certonly -n --agree-tos --email admin@bsidesslc.org --domain bsidesslc.org --webroot --webroot-path /var/www/vhosts/bsidesslc.org/httpsdocs/

It produced this output: Failed authorization procedure. bsidesslc.org (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to www.bsidesslc.org.well-known

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: bsidesslc.org
    Type: connection
    Detail: Could not connect to www.bsidesslc.org.well-known

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

My operating system is CentOS 6

My web server is Apache 2.2.15

My hosting provider is Interserver.net

Yes, I CAN login to a root shell on my machine.

No, I’m not using a control panel.

I can see .well-known in my web root. But certbot is trying to connect to bsidesslc.org.well-known, not bsidesslc.org/well-known.

What am I doing wrong?


#3

There’s a bug in your Apache configuration.

You have http://bsidesslc.org/ configured to redirect to http://www.bsidesslc.org – notice that one ends in a slash, and one doesn’t.

http://bsidesslc.org/.well-known/acme-challenge/foo is genuinely redirecting to http://www.bsidesslc.org.well-known/acme-challenge/foo. You can see for yourself with your browser or a tool like curl.

I’m not an Apache expert, but you need to check your RewriteRule or whatever sends the redirect, and add a / somewhere.

You can also configure http://bsidesslc.org/.well-known/acme-challenge/ not to redirect at all, if you prefer, but it’s not necessary. I don’t know how to do so in Apache – if it’s possible at all – off the top of my head.

(A non-buggy redirect isn’t a problem, as long as http://www.bsidesslc.org/.well-known/acme-challenge/ is configured to serve the challenge files from the proper directory.)


#4

10 points for mnordhoff!!

You nailed it.

Thank you very, very much.


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.