M
M
maxeee522020-07-01 10:43:18
Domain Name System
maxeee52, 2020-07-01 10:43:18

How to create a subdomain via SSH?

I have access to SSH, nothing else.
Is it possible to create a subdomain, register A-zips, etc. without having access to the spanel?
I would be glad to link to the relevant literature or manuals. I didn't find anything useful.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Chernykh, 2020-07-01
@sashkets

you need to take into account a number of nuances
1. the server must be authorized primary-dns for the domain
2. find out the OS on which it all works
3. find out which dns server cpanel works with (if bind is good, if something sql is more difficult here)
4 Well, how to stop / start the dns service. Where are the logs, what's in them
In a word, it's not for 5 minutes

S
Stalker_RED, 2020-07-01
@Stalker_RED

If you need a lot of subdomains, perhaps DNS wildcard will help you , a special record that allows you to direct all requests to subdomains to one server.
And the fact that you found the nginx configs is cool, and you really need to make changes there (it is possible for each subdomain separately, or also a wildcard)

server {
        listen       80;
        server_name  test.* www.test.* *.test.loc *.test.local;

        access_log  logs/test.access.log main;
        ...

How to manage DNS from the console using bind as an example is described, for example, here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question