[IPT] How to configure IPT with Apache mod_proxy?

Oliver Meyn (GBIF) omeyn at gbif.org
Mon May 2 15:11:16 CEST 2011


Hi Janno,

We successfully setup an ipt in the way you suggest, and wrote it up on a wiki page.  Please have a look at http://code.google.com/p/gbif-providertoolkit/wiki/IPTServerPreparation, right at the bottom.  Important settings copied here:

ProxyPreserveHost On
ProxyPass / http://localhost:8080/ipt/
ProxyPassReverse / http://localhost:8080/ipt/
ProxyPassReverseCookiePath /ipt /

Please try those settings and report back.  If that doesn't work we'll help you figure it out.

Thanks,
Oliver

On 2011-05-02, at 2:37 PM, janno jõgeva wrote:

> Hello!
> 
> I managed to find on line in the httpd.conf that is no needed.
> ProxyPassReverse /ipt/ http://localhost:8080/
> As I already have ProxyPreserveHost On.
> 
> But that didn't solve my problem.
> I did change the ipt.baseURL as you said. But that gets me to a point
> where some of the page contents are loaded and some are not. (I do
> have a login field and text fields but no graphical elements are
> loaded (logos etc.) ).
> 
> I'll try to give my situation:
> I have a web server running Apache2 behind a firewall that has port 80
> open and Apache2 using it. I would like to get IPT up an running so I
> decided to use jetty to run the app on port 8080 and mod_proxy to
> direct requests from Apache to IPT. I start IPT with:
> /usr/bin/java $JAVA_OPTS -classpath
> /opt/ipt/webapp/WEB-INF/classes/:/opt/ipt/webapp/WEB-INF/lib/*
> org.gbif.ipt.Server 8080
> 
> It is given as an argument to a function that makes it a service. With
> appropriate PID output dirs etc.
> 
> So it starts. I navigate to the site in a machine on the address. Log
> in to the system. Everything seams fine.
> I can see my unpublished dataset users etc.
> But when I for example want to change the role of a user it tries to
> send its request to address sitename.ee/ not to sitename.ee/ipt/ as
> usually.
> 
> The problem only seams to occur when IPT is trying to access
> ...admin/config.do or ...admin/user.do.
> When I inject ipt/admin/config.do instead of admin/config.do
> to the save button action(in the loaded page) then the changes are
> actually saved to the IPT user configuration - in this case the role
> of the user changes.
> 
> As I understand ipt.baseURL should be publicly accessible and should
> point to the installation in my server. As requests have to pass
> firewall I should point them to  sitename.ee/ipt not to sitename.ee as
> there is content served by Apache not by IPT.
> 
> I am quite new to mod_proxy as well, but as it seams be the way to go
> I started using it.
> 
> Probably I am just going the wrong way.
> 
> Best,
> Janno Jõgeva
> University of Tartu
> Natural History Museum
> 
> 
> 
> 2011/5/1 Tim Robertson (GBIF) <trobertson at gbif.org>:
>> Dear Janno,
>> 
>> Welcome to the list.
>> To my knowledge you are the first that is using mod_proxy and also using
>> Jetty - I have only used modjk to bind tomcat to apache and jetty during
>> development.
>> 
>> You should not need to change any property files - those are internal and
>> controlled by the app itself - but your point on the property file
>> commentary is quite correct.
>> 
>> Because you have changed the addressable URL, the IPT needs to know of it's
>> new address.  You can change this in the admin section (top option), or if
>> you prefer, change the
>> 
>>> ipt.baseURL=http\://sitename.domain/ipt/
>> 
>> to
>> 
>>> ipt.baseURL=http\://sitename.domain
>> 
>> and restart.
>> 
>> If you have registered any resources with GBIF then afterwards you need to
>> go into the admin section and hit the "update metadata" button to change all
>> resource URLs in the GBIF registry.
>> 
>> I hope this helps and sorts your issues,
>> Tim
>> 
>> 
>> On May 1, 2011, at 1:09 PM, janno jõgeva wrote:
>> 
>>> Hello!
>>> 
>>> I am quite new to this list so hello to everyone.
>>> Maybe I just missed something but here is my question.
>>> I am setting up an IPT node on our site. As IPT is not too much of a
>>> load it could run on a server that has other tasks as well.
>>> I have managed to set the IPT up and running via apache mod_proxy
>>> using jetty. I have daemonized it to a service on port 8080.
>>> 
>>> The version I am using is ipt-2.0.2-SNAPSHOT-r3084.
>>> 
>>> My ipt.properties is as follows:
>>> analytics.key=
>>> debug=false
>>> proxy=
>>> ipt.baseURL=http\://sitename.domain/ipt/
>>> analytics.gbif=true
>>> defaultLocale=en
>>> and apache configured as:
>>> ...
>>> ProxyPass /ipt/ http://localhost:8080/
>>> ProxyPassReverse /ipt/ http://localhost:8080/
>>> ProxyPassReverseCookiePath /ipt /
>>> ProxyPreserveHost On
>>> ...
>>> Alias   /ipt                        "/opt/ipt/webapp"
>>> <Directory                              "/opt/ipt/webapp">
>>> ...
>>> My problem - the IPT runs fine - I can make changes for example in
>>> source data SQL configuration part. but whenever the application(IPT)
>>> has to call sitename.domain/ipt/admin/user.do
>>> it calls sitename.domain/admin/user.do instead and understandably fails.
>>> My question - is there a good documentation source for the
>>> ipt.properties file? If not then could you tell me what is the "proxy"
>>> configuration parameter for?
>>> 
>>> Hope that the explanation is detailed enough.
>>> 
>>> PS.
>>> IMHO a configuration file should have documentation for each and every
>>> parameter written inside the file. It would help a lot.
>>> 
>>> Best wishes,
>>> Janno Jõgeva
>>> University of Tartu
>>> Natural History Museum
>>> _______________________________________________
>>> IPT mailing list
>>> IPT at lists.gbif.org
>>> http://lists.gbif.org/mailman/listinfo/ipt
>>> 
>> 
>> 
> _______________________________________________
> IPT mailing list
> IPT at lists.gbif.org
> http://lists.gbif.org/mailman/listinfo/ipt
> 


--
Oliver Meyn
Software Developer
Global Biodiversity Information Facility (GBIF)
+45 35 32 15 12
http://www.gbif.org



More information about the IPT mailing list