El 16/06/17 a las 10:23, Antonio Trujillo Carmona escribió: > Thank in advance for your great work. > I need to make a rewriter in a url. > We have one toncat app and we need to use it 2 scenario, > application (we can't touch it) work in enviroment aplication/.... > so if we use http://www.ourdomain.es/aplication and in haproxy we > redirec it with: > server gesforma-1 10.105.1.17:8080 > it work. > Now we need to instance of that application, so we choose: > > http://www.ourdomain.es/location1/aplication > http://www.ourdomain.es/location2/aplication > and in haproxy: > frontent > .../... > use_backend formacion-loc1 if { path_beg /location1/ } > use_backend formacion-loc2 if { path_beg /location2/ } > .../... > backend formacion-loc1 > mode http > reqirep ^([^\ :]*)\ /location1/aplication[/]?(.*) \1\ > /aplication/\2 > rspirep ^([^\ :]*)\ /aplication[/]?(.*) \1\ > /location1/aplication/\2 > option forwardfor > server gesforma-1 10.105.1.17:8080 check > > backend formacion-loc2 > mode http > reqirep ^([^\ :]*)\ /location2/aplication[/]?(.*) \1\ > /aplication/\2 > rspirep ^([^\ :]*)\ /aplication[/]?(.*) \1\ > /location2/aplication/\2 > option forwardfor > server gesforma-1 10.105.1.17:8081 check > > but it don't work, we access to the right application but all the link > that is there try to get > http://www.ourdomain.es/aplication/.... > without location but right now we only accept access with location1 or > location2 > > Is possible what we want?. > I forgot, I have : # haproxy -v HA-Proxy version 1.7.5-2~bpo8+1 2017/05/27 Copyright 2000-2017 Willy Tarreau <[email protected]>
-- *Antonio Trujillo Carmona* *Técnico de redes y sistemas.* *Subdirección de Tecnologías de la Información y Comunicaciones* Servicio Andaluz de Salud. Consejería de Salud de la Junta de Andalucía [email protected]_ Tel. +34 670947670 747670)

