Failed authorization procedure

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

ToDo:
I want to manage certificates on my central DMZ-server
and then distribute these certificates to several Web-servers

Case:
The Web-serever for sub.domain.com reside on an other server
and is online at port 80 (and 443 with old certificate)

Problem:
DMZ-server has no direct access to Web-server for generating a temporary file (well-known).
This procedure should work as sceduled task, without interaction

My domain is: api-dev.wieland.com (in example: sub.domain.com)

I ran this command:certbot certonly --preferred-challenges=http -d api-dev.wieland.com

It produced this output:
How would you like to authenticate with the ACME CA?


1: Apache Web Server plugin (apache)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)


Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
Plugins selected: Authenticator apache, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for api-dev.wieland.com
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. api-dev.wieland.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://api-dev.wieland.com/.well-known/acme-challenge/OFJ-e9823Gz4wTBEHR2vJ2KXguxcFH_w2EAtL3UF3uA [185.28.210.200]: "<!doctype html>\n<html lang="en">\n \n <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n <meta charset="UTF-8" "

IMPORTANT NOTES:

My web server is (include version):Apache 2.4.18

The operating system my web server runs on is (include version): Ubuntu (16.04.7 LTS)

My hosting provider, if applicable, is:

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

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot version: 0.31.0

1 Like

Hi @WW-Andreas

start there:

Now your setup can't work.

But if your DMZ-server has a domain name and a webserver (port 80 or 443), you can use redirects

api-dev.wieland.com/.well-known/acme-challenge/random-filename

-->

your-dmzserver.wieland.com/.well-known/acme-challenge/random-filename

then you can run an ACME client on your-dmzserver to create a certificate with api-dev...

1 Like

Please start with a known working Apache configuration.
Show the output of:
apachectl -S

1 Like

Thank you. I will test this ...

2 Likes

YES, this works.

At Web-server (sub.domain.com): Redirect to my Dmz-server
RewriteRule ^/.well-known/acme-challenge/(.*) http://dmz.domain.com/.well-known/acme-challenge/$1 [R]

At Dmz-server, running
certbot certonly --preferred-challenges=http -d sub.domain.com
--> IMPORTANT NOTES: - Congratulations! .....

1 Like

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