Fabio B.
Fabio B.

Reputation: 9400

IIS 6 + JBoss 7 web application URL configuration

Good morning!

I successfully bound my iis 6.0 to my jboss 7 web application following tutorials like this: http://www.techstacks.com/howto/iis_and_isapi_redirect.html

I used my application before going to 192.168.1.1:8080/myapp (directly to jboss)

Now I am able to use www.mydomainwebsite.my/myapp

I'm happy enough but it would be better to have simply "www.mydomainwebsite.my" pointing to the app context without seeing "myapp" in the URL.

I tried putting in uriworkermap.properties file either: /=local And /myapp/=local

But if I visit simply www.mydomainwebsite.com I still see jboss default homepage.

What am I missing?

Upvotes: 1

Views: 2708

Answers (1)

feniix
feniix

Reputation: 1628

You will need to undeploy the welcome page.

In the config change enable-welcome-root="true" to enable-welcome-root="false"

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
    <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
    <virtual-server name="default-host" enable-welcome-root="true">
        <alias name="localhost"/>
        <alias name="example.com"/>
    </virtual-server>
</subsystem>

Then make you web app work from the root context by setting it in the jboss-web.xml in the WEB-INF

<?xml version="1.0"?>
<jboss-web>
    <context-root>/</context-root>
</jboss-web>

I am not entirely sure if the last xml is well formed in respect to the xsd from jboss-as7, but should work.

Upvotes: 1

Related Questions