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?.

-- 

*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

_antonio.trujillo.sspa@juntadeandalucia.es_

Tel. +34 670947670 747670)




Reply via email to