On 29 April 2016 at 08:44, André Warnier (tomcat) <a...@ice-sa.com> wrote: > On 29.04.2016 08:59, Lyallex wrote: >> >> The problem is despite setting the to-type to permanent-redirect I'm >>>> >>>> actually getting a 302 temporary-redirect. >>>> >>>> I know this is probably off topic but if anyone has any experience of >>>> this I'd be gratefull to hear how you solved it >>>> > > If this was Apache httpd, a simple solution would be to create 2 > VirtualHost's, > - one of which listens only to port 80, and always returns a 301 to HTTPS > - the other one listening only to port 443, and holding your application > There should be a way to do the same with Tomcat. > > If not, then thinking a bit laterally : > - set up Tomcat with only a HTTPS Connector and your apps. > - set up Apache httpd with only a HTTP VirtualHost, to return the 301. > The overhead should be negligible, because the Apache httpd could be > minimally configured, if that is the only thing it ever has to do. > And since with a 301, browsers (and Google) should update their links/cache, > it would only catch the first attempts of each client. > And it saves quite a bit of overhead at the Tomcat level, which no longer > has to deal at all with catching HTTP and redirecting it.
Hi, thanks for the suggestion however I'm running tomcat as a standalone web server Is there any similar trickery I can do in server.xml (for example). thanks lyallex > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org