Reverse proxy

Hello, I’am stuck since a week on a reverse proxy problem with rasa x :

  • GOAL :
    I must provide an environement where multiple instance of rasa bot and rasa X can be accesed by internet.

  • ENV :
    https://mywebsite/skill -> NGINX -> RASA X -> RASA BOT I must use NGINX RASA X and Bot are launched on ubuntu 19.04 box with anaconda 3 in a conda virtual env with python 3.7 rasa versions :
    rasa==1.5.1
    rasa-sdk==1.5.1
    rasa-x==0.23.2

    • NGINX CONF :
      location /skill {
      proxy_pass http://rasa_x_host:10000/;
      access_log /var/log/nginx/proxy_skills-access.log;
      }
    • Launch commands :
      rasa run actions -p 10055 &
      rasa x --rasa-x-port 10000 -p 10001 --cors “*” --enable-api &
  • PROBLEM When accesing to https://mywebsite/skill, the login page doesn’t show up… the webbrowser console show that the page try to use https://mywebsite/static So for testing purpose i have append temporary to route in NGINX :
    location /login {
    proxy_pass http://rasa_x_host:10000/login;
    access_log /var/log/nginx/proxy_skills-access.log;
    }
    location /static {
    proxy_pass http://rasa_x_host:10000/static;
    access_log /var/log/nginx/proxy_skills-access.log;
    }
    => The login page show up but the browser URL bar chage from https://mywebsite/skill to https://mywebsite/login

  • BEHAVIOR EXPECTED :
    https://mywebsite/skill/login
    /!\ I can’t continue using /login /static etc… because i will have more than one rasa x and i have others applications wich are accesible by this NGINX and theses routes cause some to crash
    PS DOCKER SOLUTIONS ARE NOT POSSIBLE DUE TO OTHER INFRA CONSTRAINTS

I have tried a lot of thing in NGINX and in rasa x as well but nothing work, i have write a reverse proxy in nodejs and the behavior is the same so the only possibility is to be able to launch rasa x with a base URL (like all other web server) :
ACTUAL
Starting Rasa X in local mode…
The server is running at http://localhost:10000/login?username=me&password=ZWZhwVcrF22U
EXPECTED
Starting Rasa X in local mode…
The server is running at http://localhost:10000/BASE_URL/login?username=me&password=ZWZhwVcrF22U

If i can achieve this my reverse proxy must be OK…

QUESTIONS :
Is the a way to launch rasa x with a BASE_URL ?
If not is there a way (header/option/etc…) in NGINX or in rasa for achieve my goal ?

Best regards

2 Likes

Any news on this topic? Is there an environment variable for the base url?

Any suggestion on this? @Tobias_Wochinger