Renewing my cert an my virtualbox

Hey guys,
like every year im falling into the same issue and need again and again your excellent support.

Ok...im running an UBUNTU-Server as a HOST and have to VirtualBox Machines that are well configured.

Last night i set an nginx webserver on the HOST machine to forward ports like 8443 to 443 .
The background is, that i set up two NAT-networks on vbox that uses two connections.
Ok anyway.....one of the machines are not able to update the certs with certbot.

The dry-run was good but whenever i start to do a real update it ends with failures.

Ports 80 and 443 are setup in the firewall but im using for nginx the port 8443 to forward it to the VM.

Now i need some help from your end to solve my problem.

My (sub-)domain is:
kgswebtest.peritia-itc.de

I ran this commands:
certbot certonly --dry-run ==> The dry run was successful!
certbot certonly --webroot -w /var/www/html/KGS/ -d kgswebtest.peritia-itc.de => fail!
certbot renew -v

It produced this output:
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: kgswebtest.peritia-itc.de
Typ: unauthorized
Detail: Invalid response from from http://kgswebtest.peritia-itc.de/.well-known/acme-challenge/file: 502

Hint: The Certificate Authority failes to download the temporary challenge files created by Certbot. Ensure.....
My web server is (include version):
apache2
nginx (with reverse proxy configuration on the Host)

The operating system my web server runs on is (include version):
Ubuntu 24.04.03 LTS
My hosting provider, if applicable, is:
No, provider. Own Host.

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 2.9.0

Are you running Certbot on the Host? Or in your VMs? If the VM, why do you need a cert between your nginx in the host and the VM. It seems you could terminate TLS (HTTPS) in the Host nginx and just proxy using HTTP to your VM. Are these all in the same machine?

Ignoring those design questions ... HTTP requests to your domain are failing with an HTTP 500 error. Even requests to your "home" page fail so this is not unique to Let's Encrypt or certs.

curl -i http://www.peritia-itc.de

HTTP/1.1 500 Internal Server Error
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 10 Nov 2025 14:08:31 GMT
X-Debug-Exception: Compile%20Error%3A%20Namespace%20declaration%20statement%20has%20to%20be%20the%20very%20first%20statement%20or%20after%20any%20declare%20call%20in%20the%20script
X-Debug-Exception-File: %2Fvar%2Fwww%2Fhtml%2FKGS%2Fkgs-web-mobile%2Fsrc%2FLegacyBridge%2FdataConnectorMobilePwa.php:6

<b>Fatal error</b>:  
Namespace declaration statement has to be the very first statement or after any declare call in the script in <b>
/var/www/html/KGS/kgs-web-mobile/src/LegacyBridge/dataConnectorMobilePwa.php</b> 
on line <b>6</b><br />
2 Likes

Error solved.
Cert renewed.

Sometimes you need a wake-up call before your brain starts working again.

Thank you and have a good day.
This post can be closed.

2 Likes

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