2
votes

As I have already configured both HTTP and HTTPS connector in standalone.xml file and in HTTP connector I have used redirect-port="8443". So is there any thing I need to configure in jboss level to redirect from HTTP to HTTPS.

I want to configure this redirection only at jboss level(without any web.xml of application which deployed in jboss) and I am using JBOSS EAP 6.4.0

Also I want to know is there any solution to block HTTP(Only HTTPS work) for a particular application context which deployed in jboss eap 6.4.0.Only at JBOSS Config level.

HTTP Connector

 <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" 
            redirect-port="8443"/>

HTTPS Connector

<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" 
           enable-lookups="false" secure="true">
    <ssl name="ssl" key-alias="XXX" password="******" 
         certificate-key-file="${jboss.server.config.dir}/xxx.jks" protocol="TLSv1" 
         verify-client="false"/>
</connector>

Any Help is great

Thanks

1

1 Answers

0
votes

For the second part of the problem : How to stop access from http for specific application can be done through VirtualHost definition defined at JBOSS application server and bind your application to this host using jboss-web.xml.

<jboss-web>
    <context-root>/</context-root>
    <virtual-host>www.mydot.com</virtual-host>
</jboss-web>

Reference :

JBOSS-AS :Chapter 7. Setting up Virtual Hosts