Jump to content
Changes to the Jaspersoft community edition download ×

JasperReports 7.1 configuration behind reverce proxy


dmitry.podshivalov

Recommended Posts

Hi,

I'm tyring to configure JasperReports 7.1 which is running on  Apache Tomcat 8.5 to work behind Apache Web Server 2.4  (reverce proxy).

I have found several articles:

https://community.jaspersoft.com/questions/540381/how-configure-jasperserver-sit-behind-apache-ssl


Installing and Configuring an Apache HTTPD Server with SSL
https://community.jaspersoft.com/wiki/installing-and-configuring-apache-httpd-server-ssl

Connecting Apache Web Server to Tomcat and writing re-direct rules
https://community.jaspersoft.com/wiki/connecting-apache-web-server-tomcat-and-writing-re-direct-rules

 

But none of them helped to configure Apache as fully working reverse proxy so far.

For example, here is the configuration of Apache with mod_proxy:


<VirtualHost *:80>    ServerName jasper.xxx.xx    <Directory "/app/www/jasper">            Options FollowSymLinks            AllowOverride None            Order allow,deny            Allow from all    </Directory>    ProxyRequests Off    ProxyVia Off    ProxyPreserveHost On    <Proxy *>         Order allow,deny        Allow from all.    </Proxy>    ProxyPass /jasperserver-pro http://y.y.y.y:8080/jasperserver-pro    ProxyPassReverse /jasperserver-pro http://y.y.y.y:8080/jasperserver-pro</VirtualHost>


 

I've tried mod_proxy and mod_jk, in both configurations I get login page loaded, but authentication doesn't work, after loging attemp - the /jasperserver-pro/loginsuccess.html page redirect me back to /jasperserver-pro/login.html.
I've enabled debug logging in JRS and got this in logs:


2018-08-27 02:31:14,398 DEBUG FilterSecurityInterceptor,ajp-nio-8009-exec-2:185 - Public object - authentication not attempted2018-08-27 02:31:14,398 DEBUG FilterChainProxy,ajp-nio-8009-exec-2:337 - /runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js at position 19 of 20 in additional filter chain; firing Filter: 'JSSwitchUserProcessingFilter'2018-08-27 02:31:14,398 DEBUG FilterChainProxy,ajp-nio-8009-exec-2:337 - /runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js at position 19 of 20 in additional filter chain; firing Filter: 'JSSwitchUserProcessingFilter'2018-08-27 02:31:14,399 DEBUG FilterChainProxy,ajp-nio-8009-exec-2:337 - /runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js at position 20 of 20 in additional filter chain; firing Filter: 'IPadSupportFilter'2018-08-27 02:31:14,399 DEBUG FilterChainProxy,ajp-nio-8009-exec-2:337 - /runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js at position 20 of 20 in additional filter chain; firing Filter: 'IPadSupportFilter'2018-08-27 02:31:14,399 DEBUG FilterChainProxy,ajp-nio-8009-exec-2:323 - /runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js reached end of additional filter chain; proceeding with original chain2018-08-27 02:31:14,399 DEBUG FilterChainProxy,ajp-nio-8009-exec-2:323 - /runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js reached end of additional filter chain; proceeding with original chain2018-08-27 02:31:14,399 DEBUG JSCsrfGuardFilter,ajp-nio-8009-exec-2:66 - Checking for CSRF token in request /jasperserver-pro/runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js user-agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.02018-08-27 02:31:14,400 DEBUG RequestContextFilter,ajp-nio-8009-exec-2:114 - Bound request context to thread: org.springframework.security.web.context.HttpSessionSecurityContextRepository$Servlet3SaveToSessionRequestWrapper@6686d1952018-08-27 02:31:14,400 DEBUG ResourceForwardingServlet,ajp-nio-8009-exec-2:64 - Forwarded resource path /runtime/7D930E5B/optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js to /optimized-scripts/bower_components/jrs-ui/src/login/loginMain.js2018-08-27 02:31:14,401 DEBUG HttpSessionSecurityContextRepository,ajp-nio-8009-exec-2:304 - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.2018-08-27 02:31:14,401 DEBUG HttpSessionSecurityContextRepository,ajp-nio-8009-exec-2:304 - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.2018-08-27 02:31:14,403 DEBUG HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper,ajp-nio-8009-exec-2:211 - Skip invoking on2018-08-27 02:31:14,403 DEBUG HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper,ajp-nio-8009-exec-2:211 - Skip invoking on2018-08-27 02:31:14,403 DEBUG RequestContextFilter,ajp-nio-8009-exec-2:104 - Cleared thread-bound request context: org.springframework.security.web.context.HttpSessionSecurityContextRepository$Servlet3SaveToSessionRequestWrapper@6686d1952018-08-27 02:31:14,404 DEBUG ExceptionTranslationFilter,ajp-nio-8009-exec-2:115 - Chain processed normally2018-08-27 02:31:14,404 DEBUG ExceptionTranslationFilter,ajp-nio-8009-exec-2:115 - Chain processed normally2018-08-27 02:31:14,404 DEBUG MetadataAuthenticationProcessingFilter,ajp-nio-8009-exec-2:143 - After chain, JI metadata token is: 'org.springframework.security.authentication.AnonymousAuthenticationToken@dcdcc167: Principal:MetadataUserDetails: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@380f4: RemoteIpAddress: x.x.x.x; SessionId: 8B0865BECC0913DD5E9E0338ED993044; Granted Authorities: ROLE_ANONYMOUS'2018-08-27 02:31:14,404 DEBUG SecurityContextPersistenceFilter,ajp-nio-8009-exec-2:97 - SecurityContextHolder now cleared, as request processing completed2018-08-27 02:31:14,404 DEBUG SecurityContextPersistenceFilter,ajp-nio-8009-exec-2:97 - SecurityContextHolder now cleared, as request processing completed


I can access and login into jasperreports  using http://y.y.y.y:8080/jasperserver-pro  wihtout any problems.

What am I doing wrong?

Did anyone manage to configure JasperReports 7.1 behind a reverce proxy successfully?

Thanks a lot.
 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...