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

David Barroso david.barroso at udl.cat
Wed Aug 28 23:31:58 PDT 2013


Hello,

I was talking about these two cases:



Case 1:
----------

server.xml with an HTTP connector WITHOUT the proxyName configured

---
<Connector port="8080" protocol="HTTP/1.1" />
---

and a loadbalancer that uses http to connect to the node

---
BalancerMember http://node.example.com:8080
---


Using this configuration, you see the address of the Tomcat server
(and not the loadbalancer server as expected) when you point some
link in the Gateway (About, Features, etc ...)



Case 2:
-----------

server.xml with an AJP connector WITHOUT the proxyName configured

---
<Connector port="8009" protocol="AJP/1.3" />
---

and a loadbalancer that uses AJP to connect to the node

---
BalancerMember ajp://node.example.com:8009
---

Using this configuration, you see the address of the loadbalancer,
(as expected) when you point some link in the Gateway


If you want to use an HTTP connector, you must set the proxyName
to see the correct serverUrl.


I don't know how a stock war file without RequestFilter give the address.
Do you want me to test it?

Regards,



On 08/28/2013 09:12 PM, Charles Severance wrote:
> Are you saying that using AJP, the serverName is set properly without 
> any need of additional configuration?
>
> Does request.getServerName() and request. getRequestURL in a stock war 
> file with no RequestFilter give the address of the Apache server (as I 
> think it should) and not the address of the Tomcat server?
>
> Thanks
>
> /Chuck
>
> On Aug 28, 2013, at 2:07 AM, David Barroso <david.barroso at udl.cat 
> <mailto:david.barroso at udl.cat>> wrote:
>
>> Hello,
>>
>> When using ajp, all works correctly if you don't set proxyName in
>> server.xml.
>>
>> But if you are using a plain http proxy, you have to set it if you
>> want to see the correct serverUrl.
>>
>> Regards,
>


-- 
David Barroso Iglesias   david.barroso at udl.cat
=====================
Universitat de Lleida
Àrea de sistemes d'Informació i Comunicacions
Cap de projectes interns

University of Lleida
Information and Communication Systems Service
Internal project manager

Tlf: +34 973 702040
Fax: +34 973 702130
=====================

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


More information about the sakai-dev mailing list