V
V
Viktor3432022-03-21 13:54:51
Computer networks
Viktor343, 2022-03-21 13:54:51

How to differentiate resources on the server by subdomain name?

I want to know if it is possible, if so, what service can be used to distinguish between server services. For example, so that on request on port 80 to git.myhost.ru, the request goes to 192.168.0.1:3000 and the request to mart.myhost.ru goes to 192.168.0.1:3001

The bottom line is, I want to install several services on my raspberry pi. Installed ubuntu core. Ordered a domain name and installed the first gogs service so far. So far, on the asus router, I have set port forwarding that if a request comes in on port 80, then redirect it to 3000. I would like to distinguish between subdomains so that they all lead to my raspberry, but depending on the host name, the correct port would be substituted.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Drno, 2022-03-21
@Viktor343

what services?
and so - nginx proxy

R
Ruslan Fedoseev, 2022-03-21
@martin74ua

web server, virtual hosts.
Porting is not required.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question