I successfully generated an SSL certificate for the main domain, awesomehalal.com and www.awesomehalal.com. I'm having difficulty adding awesomehalalandgyro.com, which redirects to awesomehalal.com via DNS, to the certificate. I have tried various nginx configs and most recently tried duplicating the config from awesomehalal.com as a separate file for awesomehalalandgyro.com.
My domain is: awesomehalal.com & awesomehalalandgyro.com
I ran this command: sudo certbot --nginx -d awesomehalal.com -d www.awesomehalal.com -d awesomehalalandgyro.com -d www.awesomehalalandgyro.com
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You have an existing certificate that contains a portion of the domains you
requested (ref: /etc/letsencrypt/renewal/awesomehalal.com.conf)
It contains these names: awesomehalal.com, www.awesomehalal.com
You requested these names for the new certificate: awesomehalal.com,
www.awesomehalal.com, awesomehalalandgyro.com, www.awesomehalalandgyro.com.
Do you want to expand and replace this existing certificate with the new
certificate?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(E)xpand/(C)ancel: e
Renewing an existing certificate for awesomehalal.com and 3 more domains
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: awesomehalalandgyro.com
Type: unauthorized
Detail: 192.64.119.128: Invalid response from http://awesomehalal.com: "<!DOCTYPE html>\n<html>\n <head>\n \n <title>\n \n \n Awesome Halal and Gyro\n \n </title>\n"
Domain: www.awesomehalalandgyro.com
Type: unauthorized
Detail: 192.64.119.128: Invalid response from http://www.awesomehalal.com: "<!DOCTYPE html>\n<html>\n <head>\n \n <title>\n \n \n Awesome Halal and Gyro\n \n </title>\n"
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
My web server is (include version): nginx 1.18.0
The operating system my web server runs on is (include version): Ubuntu 20.04
My hosting provider, if applicable, is: Hostinger
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): 1.21.0
awesomehalal nginx config:
server {
#index index.html index.nginx-debian.html;
server_name awesomehalal.com www.awesomehalal.com;
location /static {
alias /home/danny/awesomehalal/app/static;
}
location / {
proxy_pass http://localhost:8000;
include /etc/nginx/proxy_params;
proxy_redirect off;
}
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security max-age=15768000;
}
awesomehalalandgyro nginx config:
server {
#index index.html index.nginx-debian.html;
server_name awesomehalalandgyro.com www.awesomehalalandgyro.com;
location /static {
alias /home/danny/awesomehalal/app/static;
}
location / {
proxy_pass http://localhost:8000;
include /etc/nginx/proxy_params;
proxy_redirect off;
}
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security max-age=15768000;
}