2 Replies Latest reply on Feb 13, 2012 11:03 AM by Christopher Villalobos

    Virtual Host under Connector

    Christopher Villalobos Newbie

      I was browsing the jboss-web.xsd and noticed that the connector has "virtual-server" listed as an optional entry. Does this mean that you can have an ssl connector that only listens on certain virtual-hosts. I played with it a little, but every time I hit that virtual domain it can back with a 403 forbidden?


      I guess the reason that I am asking is that I would like the following:


      http - sub1.example.com, sub2.example.com

      https - secure.example.com


      If I add the connector (with the correct ssl information) I know that both protocols work for all three domains. I would like secure to ONLY work with ssl (being fronted by nginx, I know I can just rewrite the URL, but I want to know that the only port available is the https port).


      Any insight?

        • 1. Re: Virtual Host under Connector
          Till Essers Newbie

          Hi there,


          I'm running into the exact same error like you did. I'm trying to have different web applications available through different ports.


          I added a new socket-binding:

          <socket-binding name="http2" port="8181"/>


          created a new virtual-server:

          <virtual-server name="foo.com" default-web-module="/multipart-war" enable-welcome-root="false"/>


          now I added a new connector, refering to both, the socket-binding and the virtual-server:

          <connector name="http2" protocol="HTTP/1.1" scheme="http" socket-binding="http2">

              <virtual-server name="foo.com"/>



          Now I only get a HTTP 403 error when trying to access port 8181.


          Is there any advice on how to do this?

          • 2. Re: Virtual Host under Connector
            Christopher Villalobos Newbie

            After you specify this, you need to make sure there is a jboss-web.xml in your WEB-INF formatted in the following manner:




            This takes care of the necessary routing within JBoss.


            Also, although this is implemented within the xsd file, I don't think that it is currently read at this point. I am still experimenting with my settings to verify this.