Answer the question
In order to leave comments, you need to log in
Proxying rewrite_mod in apache?
Initially, the request goes to an external machine with nginx, where proxying is configured to the machine with apache, which should scatter requests to specific addresses.
It is necessary to proxy the request to a specific ip in the internal network, ip is contained in the URL itself.
Example, when entering the address shop.24.4.test.info, the request should go to the address 15.10.24.4/shop (the first 2 ip numbers are the same everywhere)
RewriteEngine on
RewriteRule "~^.*shop(.*)\.test\.info.*$" http://15.10$1/shop
Answer the question
In order to leave comments, you need to log in
http://domain/path
What part of the address is shop.24.4.test.info in?
The RewriteRule only checks the path, and the domain name must be looked up in %{HTTP_HOST}.
Or
RewriteCond %{HTTP_HOST} shop(\.\d+\.\d+)\.test\.info
RewriteRule ^ http://15.10%1/shop [P]
mod_proxy by default is not worth it, it needs to be delivered
. And the nginx proxy should do this, it makes sense to invent the wheel.
well, or on the edge of php proxy also notably works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question