Answer the question
In order to leave comments, you need to log in
How to overwrite nginx entry in apache?
Hello, you need to configure apache to proxy requests to a running daemon
. The code, as I understand it, is given for nginx, I need to translate everything for apache.
The matter is that I keep a site, a site with ajax. I found a post on Habré how to make casts from ajax html. There, in the description, as I understand it, the configuration only for nginx is indicated, but I don’t really understand the server side. I will be grateful for any help.
server {
...
if ($args ~ "_escaped_fragment_=(.+)") {
set $real_url $1;
rewrite ^ /crawler$real_url;
}
location ^~ /crawler {
proxy_pass http://127.0.0.1:8888/$real_url;
}
...
}
Answer the question
In order to leave comments, you need to log in
#RewriteCond set the condition for which all this will work
RewriteCond %{HTTP_HOST} ^scaped_fragment_=.*$
RewriteRule ^_escaped_fragment_=\*$ /crawler/$1? [R=301]
RewriteRule ^http://test.ru/crawler$ http://127.0.0.1/$1? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question