Skip to content

Instantly share code, notes, and snippets.

@gregopet
Created July 19, 2012 07:38
Show Gist options
  • Save gregopet/3141388 to your computer and use it in GitHub Desktop.
Save gregopet/3141388 to your computer and use it in GitHub Desktop.
Tomcat won't redirect pages to HTTPS

The problem

I had a problem the other day where Tomcat would not redirect users to the HTTPS version of the login page (I am using the Spring Security plugin). It worked in development mode, but not in production.

The solution

The trick was to set both the grails.plugins.springsecurity.portMapper.httpPort and grails.plugins.springsecurity.portMapper.httpsPort properties to sensible values. Defaulting to 8080 and 8443 it makes sense they wouldn't work on prod. I found the answer via this Stack Overflow question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment