U
U
user.2020-08-21 17:50:23
Nginx
user., 2020-08-21 17:50:23

Proper nginx and dns setup to work with subdomains?

Greetings,
this post is purely theoretical, that is, I want to understand for myself how the work with nginx (and, in principle, any other server) works with subdomains. At the moment, I have several containers on the VDS in which cloud, git, etc. work ... access occurs according to the port (ip: port_git ip: port_cloud) the goal is to get git.example.com cloud.example.com

As I see the solution:

on the dns server
add
records

like 'A' port? Or is it necessary to set up some routing / rule in the nginx config itself?

ps: I will be glad if someone tells how it should work in stages.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Gavrilov, 2020-08-21
@nekolov

a.example.com 127.0.0.1
b.example.com 127.0.0.1
Must be and proxy with nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question