0 Replies Latest reply on Aug 17, 2010 5:42 PM by J J

    mod_jk / JBoss not picking up the port from ServerName directive

    J J Newbie

      Hi,

      I have a ServerName directive in my Apache VirtualHost file like this:

      ServerName abc.mydomain.com:999

       

      I have a mod_jk setup talking to JBoss/Tomcat using AJP at port 888

       

      When I look at the mod_jk log in debug mode, and make it print the port (%p) I see it prints 999

       

      When a request comes in to jboss(scheme=http not https), looking at the access logs, seems to me that Tomcat picks the hostname from the request header if found, otherwise defaults to ServerName. Additonally it takes the serverPort to be whatever is default, like 80. Is this default Tomcat behaviour? Can this be changed?

       

      I have used various options like UseCanonicalName On / off etc but nothing seems to work. Essentially, I need it to pick up the port number defined in the ServerName.

       

       

      One workaround I have come across is to put 'proxy' attributes as part of Server.xml. is this a reliable solution?