Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/RE_Configure_Libresource_through_apache_reverse_proxy_5 Sebastien Jourdain 2007-10-26T12:24:06+02:00 Thanks for your feed back.]]> [SOLVED] RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/_SOLVED_RE_Configure_Libresource_through_apache_reverse_proxy Alexandre Neubert 2007-10-24T12:09:43+02:00 I solved my problem by:
  • Configuring my apache to have a libresource virtual host
  • Configure the rules of the reverse proxy with a regular expression to redirect every request with the same path to Libresource server
  • Not changing the libresourceConfig.properties file

The problem was that not all resources were redirected, so I got partial information (and as result the ugly result).

Regards

A.]]> RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/RE_Configure_Libresource_through_apache_reverse_proxy_4 Alexandre Neubert 2007-10-15T17:37:36+02:00 http://ip_machine_name_B:9000 (the url where the libresource server is deployed), I get the same ugly page (the kernel.serverUrl is still configured as you sayed in your previous post). So, this does obviously not come from the reverse proxy configuration but from the kernel.serverUrl value. If I add kernel.serverUrl with subcontext, I get the right page, and if the value has no subcontext I get the page mentionned before.

Is this a DNS problem? To answer your question, a nslookup from the Libresource server machine to the apache gives me the right answer. I also compared the generated html between the two configs (local access which works and with kernel.serverUrl pointing to the reverse proxy which does not work):

  • The only difference is one html tag:
<base href="http://ip_machine_name_B:9000/"/>
vs
<base href="http://libresource_dns_name_machine_A:80//"/>

which seems normal. I really don't see why this does not work except a DNS problem. But, in that case, why do I get the ugly page when i access the server locally (with kernel.serverUrl pointing to the reverse server)?

A.]]> RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/RE_Configure_Libresource_through_apache_reverse_proxy_3 Sebastien Jourdain 2007-10-15T16:58:45+02:00

kernel.serverUrl=http://libresource_dns_name_machine_A/

But I was wondering if the libresource server has access to your specific DNS ? (in order to resolved libresource_dns_name_machine_A)

Another way of checking of what is going wrong :

  • Check the html page if it tries to retrieve stylesheet in a wrong location.
  • Check the url in another browser on the server and on another computer...
But for the moment I don't see much what happen and why it doesn't work…]]>
RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/RE_Configure_Libresource_through_apache_reverse_proxy_2 Alexandre Neubert 2007-10-15T16:40:04+02:00 So, the configuration I described becomes:
  • In the apache proxy.conf file
ProxyPass / http://ip_machine_B:9000
ProxyPassReverse / http://ip_machine_B:9000
  • In libresourceConfig.properties on the Libresource server
kernel.serverUrl=http://libresource_dns_name_machine_A/
  • In server.xml of the Libresource server:
<Connector port="9000" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="9043" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true"
               proxyName="libresource_dns_name_machine_A" proxyPort="80"/>

where libresource_dns_name_machine_A is the libresource dedicated name in our DNS. Basically, libresource_dns_name_machine_A is libresource.dns_name_machine_A, so it has the same domain.

Now, I should be able to call http://libresource_dns_name_machine_A which should redirect me to the libresource default page. Instead, I get very ugly page with no stylesheets and all libresource menus aligned on the left, no images. I tried rechange the kernel.serverUrl=http://ip_machine_name_B:9000, just for test and now I get the expected page (but of course, this solution isn't satisfying since only the first request will get through the reverse proxy).

It seems to me as if the error would come from the value I set to the kernel.serverUrl but I don't see what. Any idea?

Thanks

Regards

A.]]> RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/RE_Configure_Libresource_through_apache_reverse_proxy_1 Sebastien Jourdain 2007-10-08T11:19:01+02:00 So to do the thing you want to do, I would recommend:

  • Edit the file Distribution/build.properties and change the property "services.web.context=/libresource"
  • Set the kernel.serverUrl=http://dns_name_machine_A
  • change the proxy to point to http://dns_name_machine_B:9000/libresource
Then, let me know… But basically I would deploy the libresource on the server B with the same context as it is exposed on machine_A.

I made recent change to support context root but I don't remember if I transfered them to LSC.

Regards, ]]> RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/RE_Configure_Libresource_through_apache_reverse_proxy_0 alexandreneubert 2007-10-08T10:59:49+02:00

  • Apache 2.2 reverse proxy is running on machine A and port 80
  • Libresource server is running on machine B and port 9000
  • The conf I made:
    • In the apache proxy.conf file
    ProxyPass /libresource http://ip_machine_B:9000
    ProxyPassReverse /libresource http://ip_machine_B:9000
    • In libresourceConfig.properties on the Libresource server
    kernel.serverUrl=http://dns_name_machine_A/libresource
    • In the server.xml of the Libresource server:
    <Connector port="9000" maxHttpHeaderSize="8192"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" redirectPort="9043" acceptCount="100"
                   connectionTimeout="20000" disableUploadTimeout="true"
                   proxyName="dns_name_machine_A" proxyPort="80"/>

    So, reverse proxy is sending to Libresource server if I call: http://dns_name_machine_A/libresource and Libresource server is calling the reverse proxy via the kernel.serverUrl. Now the behavior I get in the menu for example: So, on the second url, the libresource subpath is missing and I get a proxy error which is normal. Apparently, for these links (and others) Libresource does not use the kernel.serverUrl. But, I don't see how to solve this? Maybe add a libresource context in the libresource server?

    Regards,

    A. ]]> RE : Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/RE_Configure_Libresource_through_apache_reverse_proxy Sebastien Jourdain 2007-10-05T17:46:17+02:00 To do so just edit the file JONAS_ROOT/conf/server.xml

    <Connector port="9000" maxHttpHeaderSize="8192"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" redirectPort="9043" acceptCount="100"
                   connectionTimeout="20000" disableUploadTimeout="true" 
                   proxyName="www.toto.org" proxyPort="80"/>
    ]]>
    Configure Libresource through apache reverse proxy http://dev.libresource.org/home/community/forum/Configure_Libresource_through_apache_reverse_proxy/Configure_Libresource_through_apache_reverse_proxy alexandreneubert 2007-10-05T17:36:10+02:00 I want to configure libresource to be available on a machine A through an apache reverse proxy located on a machine B.

    I added in proxy.conf of the apache following rule:

    ProxyPass /libresource http://ip_machine_A:port
    ProxyPassReverse /libresource http://ip_machine_A:port

    and in LibreSource/JONAS_4_7_6/conf/libresourceConfig.properties kernel.serverUrl=http://ip_machine_A/libresource

    This works except for hard coded paths. But I have the feeling this is not the right way.

    Does anyone has done such a configuration yet and if yes, what am I doing wrong? Or is there somewhere a documentation or simply a link?

    Thanks a lot

    Regards

    A. ]]>