5 Replies Latest reply on Sep 4, 2009 8:05 AM by emeuwese

    jboss website as default site

      I have jboss Version 4.2.3 running on a linux Centos 5 box. Currently have 1 website running on this jboss. I want to setup a domain name for the site like www.mydomain.com I have set the linux firewall to redirect requests from 80 to 8080 that jboss runs on. But when I go to my domain that I setup I get the default jboss config page.

      How do I setup this jboss site so that it responds at the ipaddress, instead of having to go to for instance http:\\192.168.125.123\mysite I want the site to be at the root of the ip.


      thanks.

        • 1. Re: jboss website as default site

          ok, I think I have it figured out now, I just changed the index.html page in the ROOT.war directory.

          I changed it to a jsp page that redirects to my site name.

          • 2. Re: jboss website as default site

            another question, how do u clear the jboss cache? I made a mistake in the typing of my redirect, I have fixed the jsp page but it's still using the old jsp page

            any ideas?

            • 3. Re: jboss website as default site

               

              "hand-solo" wrote:
              another question, how do u clear the jboss cache? I made a mistake in the typing of my redirect, I have fixed the jsp page but it's still using the old jsp page

              any ideas?
              Redeploying?

              • 4. Re: jboss website as default site

                i don't want to restart the jboss server, is it possible to deploy considering the index.jsp lies in the web-deployer ROOT.war directory?

                • 5. Re: jboss website as default site
                  emeuwese

                  You have to modify two files to make the server and your application listen to www.mydomain.com instead of the ip address.

                  First add a virtual host to jboss-web.xml in WEB-INF folder of your application.

                  <context-root>/</context-root>
                  <virtual-host>www.mydomain.com</virtual-host>


                  And then add the virtual host to jboss/server/xxx/deploy/jbossweb.sar/server.xml
                  <Host name="mydomain.com">
                  <Alias>mydomain.com</Alias>
                  <Alias>www.mydomain.com</Alias>
                  </Host>


                  Your linux firewall doesn't have to redirect requests from 80 to 8080, you could change the port number in the jboss/server/xxx/deploy/jbossweb.sar/server.xml

                  http://www.jboss.org/community/wiki/VirtualHostswithJBossAS