T
T
topuserman2020-11-17 22:04:56
System administration
topuserman, 2020-11-17 22:04:56

How to add a subdomain for a site, on a server under ubuntu?

Good afternoon!
There is a server on ubuntu,
it has two sites on different domains.

For one of the sites, you need to add a subdomain so that you can host a new site there.

On the server in the /etc/apache2/sites-enabled/ directory I see two .conf files (links) - virtual hosts.

Q: What do not need to be done to add another site to the subdomain?
Which files need to be changed? And what (I understand that on different systems it can be different)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2020-11-18
@saboteur_kiev

You make a third .conf file in sites-available, and add a link to it in sites-enabled
In terms of web servers, a subdomain and another domain are pretty much the same thing.

K
ky0, 2020-11-18
@ky0

You can add a new config to any file, or even create a new one for it (within the directories readable by Apache, of course).
The config for a subdomain does not fundamentally differ from the config of the parent domain (and indeed any) - it will just have a different name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question