Error while running jasperserver behind a Nginx reverse proxy.


i have several instances of dockerized jasperserver instances. They are running on the same server on different port.
On the same server i also has a nginx server running too. 

i have following settings on Dockerfile to host http://xx.xx.xx.xx/ instead of http://xx.xx.xx.xx/jasperserver.


RUN rm -rf /usr/local/tomcat/webapps/ROOT
RUN mv /usr/local/tomcat/webapps/jasperserver /usr/local/tomcat/webapps/ROOT
RUN rm -r /usr/local/tomcat/work



My environments are as follows.


Instance Environment
http://xx.xx.xx.xx:13425 dev
http://xx.xx.xx.xx:13427 qa
http://xx.xx.xx.xx:13429 ops

So when i point to http://xx.xx.xx.xx:13429/ . i can login to jasperserver with credentiuals.

My next step is to access jasperver via nginx.

This is my location block for ops env.

location /reporting-ops/ {

        proxy_set_header    Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        rewrite ^\/reporting-ops\/(.*) /$1 break;
        proxy_redirect off;
        proxy_pass http://xx.xx.xx.xx:13429/$1;

when i type http://xx.xx.xx.xx/reporting-ops/ on the browser i get redirected. (Please see image)

i have done same kind of url rewriting for other appl;ications and they work fine. So i assume this must be something to 
do with jasperserver.


Thank you Very much.




prageethpmplus's picture
Joined: Nov 21 2019 - 11:12pm
Last seen: 2 months 4 weeks ago

your base context (/jasperserver-pro ..or for you / since it is at root) will redirect to the login page internally.  

Here is a standard nginx proxy config for jasper at the out of box context and path.  Feel free to adjust accordingly.


rmeadows - 3 months 4 hours ago

0 Answers:

No answers yet