Answer the question
In order to leave comments, you need to log in
Nginx - or request proxying?
Several virtual machines are spinning in the local network, both web servers and voice chats, a mailer, etc.
There is only 1 external IP.
At the moment, there is a Mikrotik 951 router, which NAT sends requests to the necessary servers on certain ports. I'm sure that this scheme is not entirely correct.
Will such a decision be correct if on a separate Wirth. put the machine on Nginx, send all incoming requests to it, and use proxy_pass to send requests to the necessary servers and services? Or can only WEB requests be sent through proxy_pass?
Ideally, I want, for example
, domain.ru, site1.domain.ru, site2.domain.ru - refer to server-1
voice.domain.ru refers to server-2
mail.domain.ru throws to server-3
Now, of course, this is how it works, but everything is divided only by ports on the router.
Answer the question
In order to leave comments, you need to log in
In general, Nginx can proxy HTTP, IMAP, POP3, SMTP, and RTMP with an additional module.
But in your case, all this is not necessary and nginx could only be needed as an HTTP proxy if it were necessary to place sites with different domains on different servers in the internal network. In your case, port forwarding is a completely normal solution.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question