My domain is: micwit.com
I ran this command: sudo certbot --apache -d idp.micwit.com --debug-challenges --staging
It produced this output:
Detail: Invalid response from
http://idp.micwit.com/.well-known/acme-challenge/80EdOi_q6VVOg1ZNQyc1DzwOIy_tCnywODRCVC_WAlw:
"
My web server is (include version): Apache2
The operating system my web server runs on is (include version): Ubuntu 18.04.1
My hosting provider, if applicable, is: Panthur
I can login to a root shell on my machine (yes or no, or I don’t know): yes (for local one)
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): cpanel (for online) and none for local
So I will start by explaining the setup I have. There are 2 servers, one local and one on shared hosting (cpanel). The local one is what I want to use when anyone is on the LAN (that our local dns server points to), and the online one is what I want to use when not onsite. For the one onsite, it uses an auto SSL solution that does the certs for me. I want to have my local one do the same.
So I run the command:
sudo certbot --apache -d idp.micwit.com --debug-challenges --staging
but of course I get the message back to say the file in .well-known/acme-challenge/ can not be found, because of course it is looking to my online server.
I was thinking of using something like inotifywatch (inotify-tools) to watch that directory for new files, and do a copy up to the online server when one appears (that way it would validate the domain and set up the cert on my local server), however, no file ever actually appears there.
So how can I make it so that I can have a cert both online and local for the same subdomain?