Hi
I am trying to configure a reverse proxy to sit in front of an ArcGIS environment, link below from ESI’s documentation regarding reverse proxy config for reference.
The proxy will need to forward traffic to 2 separate backends depending on the path
For example
https://gis.domain.com/portal needs to be forwarded to ‘backend gisportal’
and
https://gis.domain.com/server needs to be forwarded to ‘backend gisserver’
This part I have working using the configuration below but both backends expect the path to be arcgis
For example
https://arcgis.test.local:7443/arcgis when forwarding to ‘backend gisportal’
and
https://arcgis.test.local:6443/arcgis when forwarding to ‘backend gisserver’
I have tried a few things with replace-path but can’t seem to figure it out.
Any help with this would be appreciated, thanks.
frontend 443
bind :80
mode http
bind :::443 v4v6 ssl crt gis.domain.com alpn h2,http/1.1
http-request redirect scheme https code 301 unless { ssl_fc }
acl letsencrypt-req path_beg /.well-known/acme-challenge/
use_backend letsencrypt if letsencrypt-req
acl portal_pathbeg path_beg -i /portal
acl server_pathbeg path_beg -i /server
acl hosts_gis hdr(host) -i gis.domain.com
use_backend gisportal if portal_pathbeg hosts_gis
use_backend gisserver if server_pathbeg hosts_gis
http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload;
backend gisportal
mode http
http-response set-header X-Server %s
server arcgis.test.local:7443 192.168.3.33:7443 check ssl verify none
backend gisserver
mode http
http-request set-header Host gis.domain.co.uk
http-request replace-path /server /arcgis
http-request replace-path /server(arc)?(.*) /\2
http-request replace-path (/arcgis/)(.*)$ \1\2
server arcgis.test.local:6443 172.xxx.x.xx:6443 check ssl verify none