Hello,
I'm trying to make a certificate using certbot, but my domain only can be accesible from www using a port number after domain name: cloud.mydomain.com:XXXXX but i obtain the error showed below.
Is there any way to made the certificate using a domain that only can be accessed in that way?
Many thanks,
Abraham.
My domain is:
cloud.airmonkey.es
I ran this command:
cert
It produced this output:
Blockquote
Saving debug log to /var/log/letsencrypt/letsencrypt.log
How would you like to authenticate with the ACME CA?
1: Apache Web Server plugin - Beta (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
Please enter in your domain name(s) (comma and/or space separated) (Enter 'c'
to cancel): cloud.airmonkey.es:11000
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for cloud.airmonkey.es
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. cloud.airmonkey.es (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://cloud.airmonkey.es/.well-known/acme-challenge/KdUI7KYulgcIwSj5xzPmjaIeO7bOqzHTz4zZSKMJVfM [109.167.111.21]: "\n\n404 Not Found\n\n
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
Blockquote
My web server is (include version):
Apache 2.4.25
The operating system my web server runs on is (include version):
Debian LXD Turnkey container, running under Proxmox
My hosting provider, if applicable, is:
Selfhosted
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):
Proxmox Hypervisor
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
0.28.0
Visible Content: Not Found The requested URL /.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de was not found on this server. Apache/2.4.29 (Ubuntu) Server at cloud.airmonkey.es Port 80
So you can use that webserver with webroot, that should always work. Perhaps use certonly to install the certificate on your other port.
I’m not familiar with certbot, so when you tell “So you can use that webserver with webroot, that should always work. Perhaps use certonly to install the certificate on your other port.”
If you use http-01 validation, Certbot creates a file in /.well-known/acme-challenge, Letsencrypt checks that file.
So if your port 80 is open and checking such a file with an unknown file name sends a http status 404 - Not Found: That’s good. No blocking firewall, no wrong redirect, no blocked 401 / 403 etc.
Find your DocumentRoot of that vHost, then use it.
sudo certbot run -a webroot -i apache -w yourDocumentRoot -d cloud.airmonkey.es
PS: Or add certonly, if you don’t have an explicit vHost.
Blockquoteroot@amnube .../apache2/sites-enabled# sudo certbot run -a webroot -i apache -w /var/www/nextcloud/ -d cloud.airmonkey.es
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for cloud.airmonkey.es
Using the webroot path /var/www/nextcloud for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. cloud.airmonkey.es (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://cloud.airmonkey.es/.well-known/acme-challenge/UEphsG1PseKpPH62Wzn_Xq_WXME54DQ9Fb7P5yeFozk [109.167.111.21]: "\n\n404 Not Found\n\n
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
I have a cluster of two servers running Proxmox with some VM’s, one of those VM is my main server “airmonkey.es” that runs with ubuntu 18.04 & ISPConfig control Panel, it has Letsencrypt configured and working ok, for that reason you can see that “airmonkey.es” is working fine with the certificate.
But i have another VM running an LXD container that runs only Nextcloud.
I only have 1 public IP, but some domains in different VM’s pointing to it, one of these domains are “cloud.airmonkey.es” but as i have a firewall to allow access from www to these nextcloud instance i only can use a NAT port (because i have no proxy configured). So i’m trying to make a letsencrypt certificate for the nextcloud instance. The vhost file that i’m checking is the file that is in the VM with nextcloud instance (the LXD container), wich have /var/www/nextcloud/ as webroot.
I’n not sure is this information can help you to understand my issue… but if you need some other information, please tell me.
I think that i’m starting to understand wich is my issue here… i’m trying to use the same name provider with my unique public ip in two different servers.
Let me dig in how to resolve this issue… maybe i think that i will buy a different domain name for cloud.airmonkey.es separate from airmonkey.es name dns controls.