Welcome! Log In Create A New Profile

Advanced

Problems with Geo-Switch

Posted by shylynx 
Problems with Geo-Switch
February 20, 2014 10:55AM
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
Attachments:
open | download - proxy_switch.conf (2.3 KB)
open | download - proxy_simple.conf (603 bytes)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 230
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready