Adding a subdomain with its own content

This is a trivial question, I hope. What is the best practice to add a sub-domain to a domain?
I have waitati.com all set up nicely. I want to add dev.waitati.com. Is there a way I can have the two serve separate content?

I have waitati.com.conf and after running certbot-auot got waitati.com-le-ssl.conf and have the redirection in waitati.com.conf. Good.

Repeating the process for dev.waitati.com.conf, (which works as http) certbot-auto acted the same, same output etcetera, but there is no dev.waitati.com-le-ssl.conf, and no redirection added to dev.waitati.com.conf.

Putting the virtual host for dev.waitati.com into waitati.com.conf and repeating the process ended up with redirection for waitati.com but not dev.waitati.com.

I end up with http://dev.waitati.com working but https://dev.waitati.com pointing at https://waitati.com

My domain is:
waitati.com

I ran this command:

certbot-auto

It produced this output:

Enhancement redirect was already set.

My web server is (include version):

$ apache2 -version
Server version: Apache/2.4.18 (Ubuntu)
Server built:   2019-10-08T13:31:25

The operating system my web server runs on is (include version):

$ cat /etc/issue
Ubuntu 16.04.6 LTS

My hosting provider, if applicable, is:

A VPS

I can login to a root shell on my machine (yes or no, or I don’t know):

Yes

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

certbot 1.0.0

1 Like

Please show the current config files.

1 Like

It was trivial.

I needed to look at the --domains argument for certbot-auto

Trivial indeed. The same certificate can serve > 1 domain.

1 Like

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