1

I've got a bonita portal application running in a Tomcat environment behind an apache reverse proxy (2.4).

My current config in my virtualhost is working fine for url like https://www.mybonita.com/bonita/:

ProxyPass         /bonita  http://localhost:8080/bonita
ProxyPassReverse  /bonita  http://localhost:8080/bonita

What I would like to do now is to make it works with a url like: https://www.mybonita.com/ or at least https://www.mybonita.com/myapp/

I did this new configuration

ProxyPass         /myapp http://localhost:8080/bonita
ProxyPassReverse  /myapp http://localhost:8080/bonita

But it gives me "The requested URL /bonita/ was not found on this server."

So I modified to:

    ProxyPass         /myapp/  http://localhost:8080/bonita/
    ProxyPassReverse  /myapp/  http://localhost:8080/bonita/

That was better, I could see the login page, but the url is like: https://www.mybonita.com/bonita/login.jsp?redirectUrl=%2Fbonita%2Fportal%2Fhomepage and then when I want to login, I have a 404 error page....

Then, I tried to add this line

ProxyPassReverse  /myapp  /bonita

It seemed at first better (no more 404 errors... a url without 'bonita' anymore in it)... but I can't login... The page comes always to the login page with no particular error message...

So, what would be a correct configuration to have a Bonita portal working behind an apache reverse proxy with a personalized URL?

1 Answers1

1

I did it this way:

RewriteEngine  on
RewriteRule    "^(?!/bonita)(.*)$"  "/bonita$1" [R,L]
RewriteRule    "^/(.*)"  "http://127.0.0.1:8080/$1" [P]
ProxyPassReverse "/" "http://127.0.0.1:8080/"
sparse
  • 139
  • 1
  • 5