[Building Sakai] Tomcat Connector Question When RUnning Behind a Proxy

Charles Severance csev at umich.edu
Mon Aug 26 14:49:55 PDT 2013


If people run their Tomcat's behind load balancers, do we typically set the proxyName and similar values on conf/server.xml or do we just let the defaults happen:

    <!-- AJP Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
               maxThreads="1000" minSpareThreads="50" maxSpareThreads="100"
               maxPostSize="50000000" enableLookups="true"

               proxyName="ctools.umich.edu"
               proxyPort="443"
               secure="true"
               scheme="https"

               tomcatAuthentication="false" URIEncoding="UTF-8" />

If you want to be surprised at a bit of code inside Sakai serverUrl(HttpServletRequest req) in this code:

https://source.sakaiproject.org/svn//kernel/trunk/api/src/main/java/org/sakaiproject/util/RequestFilter.java

And then the look at getServerUrl() here

https://source.sakaiproject.org/svn//kernel/trunk//kernel-impl/src/main/java/org/sakaiproject/component/impl/BasicConfigurationService.java

If you trace all this code through it will become clear to you that when we do a 

ServerConfigurationService.getServerUrl()

Depending on whether it is a tool, portlet, or servlet, we are actually quite likely to get a URL reconstructed from the HTTP request object *instead* of the 

serverUrl=https://ctools.umich.edu

property from sakai.properties as I best most of us would expect given the behavior of most of the other ServerConfigurationService methods.

So my question is whether or not people actively setting proxyName and friends in server.xml on their production and staging servers that live behind proxies?

At this point I would *not* classify this as a bug per-se - but it does seem as though it is important for a Sakai system to function to have connectors behind proxies fully configured with the public-faxing proxy info.

Or am I just confused.

/Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130826/d687f81b/attachment.html 


More information about the sakai-dev mailing list