S
S
speedvm2020-03-27 10:18:08
Nginx
speedvm, 2020-03-27 10:18:08

Is it possible to configure access to apache only through nginx?

Good day!
There is an apache server with a web resource. There is an nginx server that redirects requests to the apache server. There are proxy settings on nginx:

proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

Is it possible to configure apache in such a way that it accepts requests only from nginx, and at the same time does not violate the proxy settings (real client ip addresses)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lynn "Coffee Man", 2020-03-27
@Lynn

Are they on the same car?
If yes, then just hang Apache on 127.0.0.1
. If not, then configure a firewall on the Apache machine to allow connections only from the nginx host.

I
Ilya, 2020-03-27
@New_Horizons

mb close apache port

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question