martedì 5 giugno 2012

openshift+jboss: RewriteValve from 80 to 443

riportato dal forum:


1. In your application, create a file called jboss-web.xml in src/main/webapp/WEB-INF/ directory with this content.
 sh$ cat  src/main/webapp/WEB-INF/jboss-web.xml   
<jboss-web>
      <security-domain>jboss-web-policy</security-domain>
       <valve>
             <class-name>org.jboss.web.rewrite.RewriteValve</class-name>
       </valve>
</jboss-web>
2. Create a rewrite.properties file in the src/main/webapp/WEB-INF/ directory with checking for http and redirecting to https.
sh$ cat src/main/webapp/WEB-INF/rewrite.properties  
RewriteCond %{HTTP:X-Forwarded-Proto} http   
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]    

links utili

Nessun commento: