7 Replies Latest reply on Jul 16, 2005 8:32 AM by joschan273

    How do I get http://localhost/web-console working?

    joschan273

      Hi,

      I have install Apache 2.0.54 and JBOSS 4.0.2 in Windows 2003 server, much appreciated if someone can verify if it is achievable to use

      http://localhost/web-console rather than http://localhost:8080/web-console to bring up JBOSS Admin page.
      Some said it can, but others said not.

      If it works, can someone explain it to me in layment term what does it achieve or proof please.


      Thank you.

        • 1. Re: How do I get http://localhost/web-console working?
          darranl

          When the port number is removed from the URL the web browser will attempt to connect to the web server using port 80 for non secured access and port 443 for https access.

          You have two options both available from the following link.

          http://wiki.jboss.org/wiki/Wiki.jsp?page=Tomcat

          Configure the embeded Tomcat to listen on port 80.

          Have apache configured to listen for requests on port 80 and use mod_jk to delegate the requests to the embeded Tomcat in JBoss.

          • 2. Re: How do I get http://localhost/web-console working?
            joschan273

            arrrgh....I tried (http://wiki.jboss.org/wiki/Wiki.jsp?page=Tomcat ) and had spent about 5 hours all together in the last two nights and couldn't get it working. (and I don't have intentions to run load-balancing or failover in this case). I also post questions in relation to some of instructions in wiki forum but received no reply as yet.

            Hence, I post this question and hope someone has a simpler way to implement.

            What does it mean if it is proven http://localhost/web-console works?

            Please advise.

            Jos




            • 3. Re: How do I get http://localhost/web-console working?
              darranl

              You have already said in your first post that you have installed apache, this suggests that you want to use apache, using apache means you need to look at mod_jk.

              The forum you have posted your question in is for the discussion of the maintenance of the wiki pages, it is not the forum to ask user questions.

              So as you do not want to use apache with mod_jk, uninstall apache and make sure nothing is listening on port 80 and follow the instructions on the Tomcat wiki page and configure tomcat to listen on port 80 instead of 8080.

              http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigureServerPorts

              When you see a line that says: -

              Edit JBOSS_HOME/server/all/deploy/jbossweb-tomcat50.sar/server.xml (replace /all with your own server name)


              It does not mean that you need to find a string /all and replace it.

              It means that the person writing the wiki was running the all configuration of JBoss (As in all, default, minimal) and if you are running the default configuration or a custom configuration you will find the file you need in a different folder.

              e.g.

              JBOSS_HOME/server/default/deploy/jbossweb-tomcat50.sar/server.xml
              JBOSS_HOME/server/myconfigname/deploy/jbossweb-tomcat50.sar/server.xml

              • 4. Re: How do I get http://localhost/web-console working?
                joschan273

                Right, I did misunderstand the instruction back there.

                I did download mod_jk-1.2.14-apache-2.0.54.so and rename it to mod_jk and put it under Apache /modules

                In my httpd.conf, I have included

                # Specify the filename of the mod_jk lib
                LoadModule jk_module modules/mod_jk.so

                # Where to find workers.properties
                JkWorkersFile conf/workers.properties

                # Where to put jk logs
                JkLogFile logs/mod_jk.log

                # Set the jk log level [debug/error/info]
                JkLogLevel debug



                In my workers.properties file

                [shm]
                file=c:/apache2/logs/shm.file
                size=1048576

                # Example socket channel, override port and host.
                [channel.socket:localhost:8009]
                port=8009
                host=localhost

                # define the worker
                [ajp13:localhost:8009]
                channel=channel.socket:localhost:8009

                # Uri mapping
                [uri:10.0.0.121/*.jsp]
                worker=ajp13:localhost:8009

                [uri:10.0.0.121/servlet/*]
                worker=ajp13:localhost:8009

                [uri:10.0.0.121/web-console/*]
                worker=ajp13:localhost:8009

                [uri:localhost/*.jsp]
                worker=ajp13:localhost:8009

                [uri:localhost/servlet/*]
                worker=ajp13:localhost:8009

                [uri:localhost:8080/web-console/*]
                worker=ajp13:localhost:8009



                Have I done something wrong?

                Please advise.

                Thank you.

                • 6. Re: How do I get http://localhost/web-console working?
                  joschan273

                  Hi, more attempts again, and still no go.

                  Ok. JBOSS 4.0.2 works fine by itself, Apache 2.0.54 works fine by itself. I had download mod_jk-1.2.14-apache-2.0.54.so and rename it as mod_jk and put it in Apache2 /module directory

                  Apache Setup

                  Here is my apache httpd.conf
                  # Include mod_jk configuration file
                  Include conf/mod-jk.conf


                  Here is my mod-jk.conf
                  # Load mod_jk module
                  # Specify the filename of the mod_jk lib
                  LoadModule jk_module modules/mod_jk.so

                  # Where to find workers.properties
                  JkWorkersFile conf/workers.properties

                  # Where to put jk logs
                  JkLogFile logs/mod_jk.log

                  # Set the jk log level [debug/error/info]
                  JkLogLevel info

                  # Select the log format
                  JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

                  # JkOptions indicates to send SSK KEY SIZE
                  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

                  # JkRequestLogFormat
                  JkRequestLogFormat "%w %V %T"

                  # Mount your applications
                  JkMount /application/* loadbalancer

                  # You can use external file for mount points.
                  # It will be checked for updates each 60 seconds.
                  # The format of the file is: /url=worker
                  # /examples/*=loadbalancer
                  JkMountFile conf/uriworkermap.properties

                  # Add shared memory.
                  # This directive is present with 1.2.10 and
                  # later versions of mod_jk, and is needed for
                  # for load balancing to work properly
                  JkShmFile logs/jk.shm

                  # Add jkstatus for managing runtime data
                  <Location /jkstatus/>
                  JkMount status
                  Order deny,allow
                  Deny from all
                  Allow from 127.0.0.1



                  Here is my uriworkermap.properties

                  # Simple worker configuration file
                  #

                  # Mount the Servlet context to the ajp13 worker
                  /jmx-console=loadbalancer
                  /jmx-console/*=loadbalancer


                  Here is my workers.properties
                  # Define list of workers that will be used
                  # for mapping requests
                  worker.list=loadbalancer,status
                  # Define Node1
                  worker.node1.port=8009
                  worker.node1.host=localhost
                  worker.node1.type=ajp13
                  worker.node1.lbfactor=1
                  #worker.node1.local_worker=1 (1)
                  worker.node1.cachesize=10

                  # Define Node2
                  worker.node2.port=8009
                  worker.node2.host=localhost
                  worker.node2.type=ajp13
                  worker.node2.lbfactor=1
                  #worker.node2.local_worker=1 (1)
                  worker.node2.cachesize=10

                  # Load-balancing behaviour
                  worker.loadbalancer.type=lb
                  worker.loadbalancer.balanced_workers=node1, node2
                  worker.loadbalancer.sticky_session=1
                  worker.loadbalancer.local_worker_only=1
                  worker.list=loadbalancer

                  # Status worker for managing load balancer
                  worker.status.type=status



                  JBoss setup
                  copy directory \jboss-4.0.2\server\default to \jboss-4.0.2\server\test1

                  Here is my server.xml under tomcat.sar


                  <!-- The JAAS based authentication and authorization realm implementation
                  that is compatible with the jboss 3.2.x realm implementation.
                  - certificatePrincipal : the class name of the
                  org.jboss.security.auth.certs.CertificatePrincipal impl
                  used for mapping X509[] cert chains to a Princpal.
                  -->

                  <!-- A subclass of JBossSecurityMgrRealm that uses the authentication
                  behavior of JBossSecurityMgrRealm, but overrides the authorization
                  checks to use JACC permissions with the current java.security.Policy
                  to determine authorized access.

                  -->



                  <!-- Uncomment to enable request dumper. This Valve "logs interesting
                  contents from the specified Request (before processing) and the
                  corresponding Response (after processing). It is especially useful
                  in debugging problems related to headers and cookies."
                  -->
                  <!--

                  -->

                  <!-- Access logger -->
                  <!--

                  -->

                  <!-- Uncomment to enable single sign-on across web apps
                  deployed to this host. Does not provide SSO across a cluster.

                  If this valve is used, do not use the JBoss ClusteredSingleSignOn
                  valve shown below.
                  -->
                  <!--

                  -->

                  <!-- Uncomment to enable single sign-on across web apps
                  deployed to this host AND to all other hosts in the cluster
                  with the same virtual hostname.

                  If this valve is used, do not use the standard Tomcat SingleSignOn
                  valve shown above.

                  This valve uses JGroups to communicate across the cluster. The
                  JGroups Channel used for this communication can be configured
                  by editing the "sso-channel.xml" file found in the same folder
                  as this file. If this valve is running on a machine with multiple
                  IP addresses, configuring the "bind_addr" property of the JGroups
                  UDP protocol may be necessary. Another possible configuration
                  change would be to enable encryption of intra-cluster communications.
                  See the sso-channel.xml file for more details.

                  Besides the attributes supported by the standard Tomcat
                  SingleSignOn valve (see the Tomcat docs), this version also supports
                  the following attribute:

                  partitionName the name of the cluster partition in which
                  this node participates. If not set, the default
                  value is "sso-partition/" + the value of the
                  "name" attribute of the Host element that
                  encloses this element (e.g. "sso-partition/localhost")
                  -->
                  <!--

                  -->

                  <!-- Uncomment to check for unclosed connections and transaction terminated checks
                  in servlets/jsps.
                  Important: You need to uncomment the dependency on the CachedConnectionManager
                  in META-INF/jboss-service.xml

                  -->







                  <!-- The JAAS based authentication and authorization realm implementation
                  that is compatible with the jboss 3.2.x realm implementation.
                  - certificatePrincipal : the class name of the
                  org.jboss.security.auth.certs.CertificatePrincipal impl
                  used for mapping X509[] cert chains to a Princpal.
                  -->

                  <!-- A subclass of JBossSecurityMgrRealm that uses the authentication
                  behavior of JBossSecurityMgrRealm, but overrides the authorization
                  checks to use JACC permissions with the current java.security.Policy
                  to determine authorized access.

                  -->



                  <!-- Uncomment to enable request dumper. This Valve "logs interesting
                  contents from the specified Request (before processing) and the
                  corresponding Response (after processing). It is especially useful
                  in debugging problems related to headers and cookies."
                  -->
                  <!--

                  -->

                  <!-- Access logger -->
                  <!--

                  -->

                  <!-- Uncomment to enable single sign-on across web apps
                  deployed to this host. Does not provide SSO across a cluster.

                  If this valve is used, do not use the JBoss ClusteredSingleSignOn
                  valve shown below.
                  -->
                  <!--

                  -->

                  <!-- Uncomment to enable single sign-on across web apps
                  deployed to this host AND to all other hosts in the cluster
                  with the same virtual hostname.

                  If this valve is used, do not use the standard Tomcat SingleSignOn
                  valve shown above.

                  This valve uses JGroups to communicate across the cluster. The
                  JGroups Channel used for this communication can be configured
                  by editing the "sso-channel.xml" file found in the same folder
                  as this file. If this valve is running on a machine with multiple
                  IP addresses, configuring the "bind_addr" property of the JGroups
                  UDP protocol may be necessary. Another possible configuration
                  change would be to enable encryption of intra-cluster communications.
                  See the sso-channel.xml file for more details.

                  Besides the attributes supported by the standard Tomcat
                  SingleSignOn valve (see the Tomcat docs), this version also supports
                  the following attribute:


                  partitionName the name of the cluster partition in which
                  this node participates. If not set, the default
                  value is "sso-partition/" + the value of the
                  "name" attribute of the Host element that
                  encloses this element (e.g. "sso-partition/localhost")
                  -->
                  <!--

                  -->

                  <!-- Uncomment to check for unclosed connections and transaction terminated checks
                  in servlets/jsps.
                  Important: You need to uncomment the dependency on the CachedConnectionManager
                  in META-INF/jboss-service.xml

                  -->







                  Here is my jboss-service.xml
                  "UseJK">true



                  ===========
                  From the DOS (command) prompt, go to JBoss\bin directory

                  run.bat -c test1

                  type in http://localhost/web-console

                  404 Not found - Mozilla Firefox
                  Not Found

                  The requested URL /web-console was not found on this server.
                  Apache/2.0.54 (Win32) mod_jk/1.2.14 Server at localhost Port 80


                  ===========
                  Can anyone advise me what have I done wrong?

                  Thank you.

                  • 7. Re: How do I get http://localhost/web-console working?
                    joschan273

                    Sorry, one mistake there

                    It should read

                    JBoss setup
                    copy directory \jboss-4.0.2\server\all to \jboss-4.0.2\server\test1