1

looking for a right way to accomplish the following:

there is an app that have URL(1) hardcoded and no way/time to change it in the source

http://dev.server.com/example.com/admin/soap/action/index?pr=1

and it should use (and get response from) URL(2)

http://example.com/admin/soap/action/index?pr=1

what should I configure in Nginx (apache as backup used) conf on dev.server.com in order to give that app when it asks URL(1) answer from URL(2)?

On dev.server.com Apache has virtual host: dev.server.com enabled.

Also I've tried to proxy in apache instead of nginx by using ProxyPass:

    <Directory /var/www/dev>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride all
            Order allow,deny
            allow from all
    </Directory>
    <Location /example.com/admin/soap>
       ProxyPass http://example.com/admin/soap
    </Location>
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
user2606078
  • 11
  • 1
  • 3
  • Your question is very unclear. Is this one or two servers? Which one is running Apache? Which one is running NGINX? Which way to do want to rewrite, from dev.server.com to domain.com or the other way around? – chrskly May 26 '14 at 11:17

1 Answers1

0

Try with this location in Nginx config file:

location /example.com/admin/soap/action/index {
   proxy_pass http://example.com/admin/soap/action/index;
}

A possible solution on apache is:

<Location /example.com/admin/soap/action/index>
   ProxyPass http://example.com/admin/soap/action/index
</Location>
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
Guido Vaccarella
  • 1,418
  • 14
  • 13