0

How do i convert below proxypass rules from apache to 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
ganpya
  • 5
  • 4

1 Answers1

0

The following NGINX directives should do the trick:

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;
}

There are plenty of other options you may want to configure, refer to NGINX http proxy module documentation for the details.

zygis
  • 101
  • 2