GitHub Pages SSL + SSL on server

Hello.

I create website example.com on GitHub Pages, and have letsencrypt SSL.
I need SSL on subdomain api.example.com on my VPS.

If I generate a certificate on the server, will the GitHub certificate not be lost?

/etc/certbot-auto certonly --non-interactive --webroot --renew-by-default --agree-tos --expand --email support@example.com --cert-path /etc/letsencrypt/live/example.com/ --chain-path /etc/letsencrypt/live/example.com/ --fullchain-path /etc/letsencrypt/live/example.com/ --key-path /etc/letsencrypt/live/example.com/ --cert-name example.com -w /home/api.example.com/ -d example.com -d www.example.com -d api.example.com

no

You should only request certificate for sites on your VPS, since you can't serve validation tokens (on your VPS) for the site you had on GitHub.

1 Like

Only for api.example.com?
/etc/certbot-auto certonly --non-interactive --webroot --renew-by-default --agree-tos --expand --email support@example.com --cert-path /etc/letsencrypt/live/api.example.com/ --chain-path /etc/letsencrypt/live/api.example.com/ --fullchain-path /etc/letsencrypt/live/api.example.com/ --key-path /etc/letsencrypt/live/api.example.com/ --cert-name api.example.com -w /home/api.example.com/ -d api.example.com

If only api.example.com is located in your server.

1 Like

Yes, api.example.com on server.
example.com on GitHub Pages

Then this command is correct. (Just make sure each argument is correct)

Most of these options are probably not necessary and reflect defaults, or features that probably don't apply to your situation. You would probably also do OK with

/etc/certbot-auto certonly --non-interactive --webroot --agree-tos --email support@example.com -w /home/api.example.com/ -d api.example.com

for a session that must be noninteractive, or even just

/etc/certbot-auto certonly --webroot -w /home/api.example.com/ -d api.example.com

if you're willing to have Certbot interact with you if absolutely necessary. I mostly suggest this because it's easier to read and understand.

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