Problem with certbot in the certificate generation


#1

Hello,
i’m trying to make a certificate with certbot (letsencrypt) for my installation (manual) of rocketchat but i struggle.
My certificate need to be on a subdomain and i already have one certificate generated for another subdomain.
How can i generate my certificate to be able to connect to my rocket chat with the ios/android app.

Can someone help?

Thank you in advance.

PS: sorry if my english is bad i’m not an native speaker.


#2

You are allowed to generate multiple certificates with certbot - generate another certificate for a new domain name.


#3

This, you should be able to use certbot to get certs for multiple domains and subdomains.


#4

Sorry for the late answer. I know i can generate multi certificate. the probleme is in the command :

certbot certonly --webroot -w /var/www/example -d www(dot)example(dot)com -d example(dot)com -w /var/www/other -d other(dot)example(dot)net -d another(dot)other(dot)example(dot)net

this is my error : http://xxx(dot)xxx(dot)com/.well-known/acme-challenge/GbuEciYf3HsvpG3R5IDyfM85iLbgk3Yq3BjJGk-pcIE:
"

404 Not Found

Not Found

<p" 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.

the domain name is good, i really dont understand what i’m doing wrong.


#5

I believe in conjunction you have to actually define a location in nginx/apache to handle the .well-known and proxy to certbot so it can serve up the challenge.


#6

Thank you for the answer. Can you link me a good tutorial to setup the well-know for rocket chat with apache 2.4? All the tutorial i’m trying doesn’t work.


#7

I don’t use Apache now days :). But if you describe what you tried and maybe what tutorial followed. Can probably get you going right direction


#8

sorry for the late answer again. i tried to insert this in my virtual host

Alias /.well-known/acme-challenge/ “/var/www/letsencrypt/”
<Location /.well-known/acme-challenge/>
# Security Options
Options None
AllowOverride None
ForceType text/plain
RedirectMatch 404 “^(?!/.well-known/acme-challenge/[\w-]{43}$)”

i tried with this solution aswell:

Alias /.well-known/acme-challenge/ /var/www/letsencrypt/.well-known/acme-challenge/

<Directory “/var/www/html/.well-known/acme-challenge/”>
Options None
AllowOverride None
ForceType text/plain
RedirectMatch 404 “^(?!/.well-known/acme-challenge/[\w-]{43}$)”

nothing works :
Type: unauthorized
Detail: Invalid response from