Thank you all very much. I now have the domains successfully added to the SSL certificate. Currently, however, the gyro domain only redirects when http is entered, not https. I've tried to modify the certbot-generated config based on answers I've seen elsewhere, but not quite there yet. Note my changes to the return 301
statements for the gyro domain:
server {
#index index.html index.nginx-debian.html;
server_name awesomehalal.com www.awesomehalal.com 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;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/awesomehalal.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/awesomehalal.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.awesomehalalandgyro.com) {
return 301 https://awesomehalal.com$request_uri;
} # managed by Certbot
if ($host = awesomehalalandgyro.com) {
return 301 https://awesomehalal.com$request_uri;
} # managed by Certbot
if ($host = www.awesomehalal.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = awesomehalal.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name awesomehalal.com www.awesomehalal.com awesomehalalandgyro.com www.awesomehalalandgyro.com;
listen 80;
return 404; # managed by Certbot
}