Hi,
I'am very new to nginx and I have to realize a location switch. We have a single point of entry https://switching.beta.tecdi/DMS/. At this single point of entry I have to split up the requests depending on the location of the ip of the client, namely based on the following rules:
Pass requests of users from location X to https://dms-autom.server.tecdi:8444/DMS/
Pass requests of users from location Y to https://alm-staging-vm.entertain.tecdi:10090/svnwebclient.webapp/
I attached 2 configurations. The first configuration is a very simple configuration without variables. This configuration doesn't work because it seams, that the request isn't correctly rewritten. Especially, when I navigate to some sites, I get redirected to the backend "http://boehm.dresden.tgr.local:9080" and not the single point of entry. I played around with variable $request_uri, but I'm not sure wether I use it in the right way.
The second more complex configuration has the location switch. There I also have some sites, where the redirect is wrong. Can somebody describe, if I use the directives correct or have I missunderstood the nginx-documention?
Is the usage of directives rewrite, proxy_pass and proxy_redirect correct or have I missed something or missused something? Especially I doesn't found any proper description in which cases and in which directives I can use variables or regex-replacements for path, port, schema and resourcepath .
Thanks for your reply
I'am very new to nginx and I have to realize a location switch. We have a single point of entry https://switching.beta.tecdi/DMS/. At this single point of entry I have to split up the requests depending on the location of the ip of the client, namely based on the following rules:
Pass requests of users from location X to https://dms-autom.server.tecdi:8444/DMS/
Pass requests of users from location Y to https://alm-staging-vm.entertain.tecdi:10090/svnwebclient.webapp/
I attached 2 configurations. The first configuration is a very simple configuration without variables. This configuration doesn't work because it seams, that the request isn't correctly rewritten. Especially, when I navigate to some sites, I get redirected to the backend "http://boehm.dresden.tgr.local:9080" and not the single point of entry. I played around with variable $request_uri, but I'm not sure wether I use it in the right way.
The second more complex configuration has the location switch. There I also have some sites, where the redirect is wrong. Can somebody describe, if I use the directives correct or have I missunderstood the nginx-documention?
Is the usage of directives rewrite, proxy_pass and proxy_redirect correct or have I missed something or missused something? Especially I doesn't found any proper description in which cases and in which directives I can use variables or regex-replacements for path, port, schema and resourcepath .
Thanks for your reply