Как преобразовать указанные ниже правила proxypass из apache в nginx
ProxyPass /symptoms-search http://medgle.com/symptoms-search ProxyPassReverse /symptoms-search http://medgle.com/symptoms-search ProxyPass /ajaxmatch.jsp http://medgle.com/ajaxmatch.jsp ProxyPassReverse /ajaxmatch.jsp http://medgle.com/ajaxmatch.jsp
Следующие директивы NGINX должны помочь:
location /symptoms-search {
proxy_pass http://medgle.com/symptoms-search;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location = /ajaxmatch.jsp {
proxy_pass http://medgle.com/ajaxmatch.jsp;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
Есть много других параметров, которые вы можете настроить, см. NGINX документация по модулю HTTP-прокси для подробностей.