N
N
Nday0012020-05-26 14:48:09
Nginx
Nday001, 2020-05-26 14:48:09

nginx. How to redirect http requests to different machines depending on the URI?

There are 3 Apache websites on 3 different machines on the local network.
Let's say: Site1.local - 10.0.0.1, Site2.local - 10.0.0.2, Site3.local - 10.0.0.3
There is 1 external IP address and 1 domain name example.org.
I want to proxy Nginx like this:
example.org/Site1 to Site1.local machine
example.org/Site2 to Site2.local machine
example.org/Site3 to Site3.local machine
Can I do this or do I need several domain names ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
paran0id, 2020-05-26
@Nday001

You make as many locations as you need inside the example.com server, in each proxy_pass where necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question