A
A
Alex Devera2021-11-09 23:48:31
linux
Alex Devera, 2021-11-09 23:48:31

How to set up a subdirectory on apache using reverse proxy?

There is a web-server (server # 1), the site is running on it, located at the conditional address "my-site.com". It is accessible from the external network. Will be used as a proxy server.
There is a second web server (server # 2) with NC on the same local network. It is located behind NAT, it is not accessible from the outside.
Is it possible that when going to my-site.com the site from server#1 is still opened, and when going to the subdirectory (my-site.com/nc) the contents of server#2 are opened?
I tried following this instruction, it only turned out to forward NC (server # 2 content), the site from server # 1 was unavailable.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2021-11-09
@ky0

Try to google the same thing, but without Apache, but with nginx - the very first manuals will help you.

V
Victor Taran, 2021-11-10
@shambler81

You can do without servers at all, cheap and cheerful.
1. Download the file
2. in 404.php we throw it at the top, before returning the 404 code, we check the url for the condition we need in your case if the url is my-site.com/nc
Well, accordingly, server1 is projected to server 2 and gives content from it .
All. if there is no given url from that side either, then you give 404 as always.
Really about 30 lines of code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question