You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by John Ainsworth <jo...@manchester.ac.uk> on 2005/01/06 12:34:48 UTC

Accessing Xindice over https

Hi,

is it possible to have a client which accesses Xindice via https? It 
seems that xmldb:xindice://server:port is always resolved to 
http://server:port. Is it possible to make it resolve to 
https://server:port?

thanks
John


Re: Accessing Xindice over https

Posted by John Ainsworth <jo...@manchester.ac.uk>.
Andre,

thanks for your answer but that's not what I wanted to do.

I have Xindice running in my servlet engine, for which I have enabled 
https access on port 1043. (So from a web browser I can go to 
https://myserver:1043/xindice and get the Ugly browser).

 From  my client programmatically I do
DatabaseManager.getCollection("xmldb:xindice://myserver:1043/db")
but this results in...

Caused by: javax.xml.rpc.ServiceException: Service not available: 
org.xmldb.api.
base.XMLDBException: Cannot communicate with the server: 
http://myserver:1043/xindice/

which is understandable. What I need is to programmatically set the 
service URL to https://myserver:1043/xindice.

cheers
John

On 6 Jan 2005, at 11:54, Andre Juffer wrote:

> John Ainsworth wrote:
>> Hi,
>> is it possible to have a client which accesses Xindice via https? It 
>> seems that xmldb:xindice://server:port is always resolved to 
>> http://server:port. Is it possible to make it resolve to 
>> https://server:port?
>
> How about the following:
>
> Use a web server https protocol on your database server. E.g. for the 
> Apache webserver, you could use:
>
> ProxyPass         /xindice  http://localhost:8082/xindice
> ProxyPassReverse  /xindice  http://localhost:8082/xindice
>
> I use Tomcat as my servlet engine. Ensure that you something like
>
> <snip>
> <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
> <!-- See proxy documentation for more information about using this. -->
>
>     <Connector port="8082"
>                maxThreads="150" minSpareThreads="25" 
> maxSpareThreads="75"
>                enableLookups="false"
>                acceptCount="100" debug="0" connectionTimeout="20000"
>                proxyPort="80" disableUploadTimeout="true" />
> </snip>
>
> in your conf/server.xml.
>
> I use this for other webapps, so I would assume that this works also 
> for Xindice.
>
> Additional security can be probably obtained with a proper 
> configuration of your web server's firewall.
>
>> thanks
>> John
>
>
> -- 
> Andre H. Juffer              | Phone: +358-8-553 1161
> The Biocenter and            | Fax: +358-8-553-1141
>     the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
> University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
>


Re: Accessing Xindice over https

Posted by Andre Juffer <aj...@sun3.oulu.fi>.
John Ainsworth wrote:
> Hi,
> 
> is it possible to have a client which accesses Xindice via https? It 
> seems that xmldb:xindice://server:port is always resolved to 
> http://server:port. Is it possible to make it resolve to 
> https://server:port?

How about the following:

Use a web server https protocol on your database server. E.g. for the 
Apache webserver, you could use:

ProxyPass         /xindice  http://localhost:8082/xindice
ProxyPassReverse  /xindice  http://localhost:8082/xindice

I use Tomcat as my servlet engine. Ensure that you something like

<snip>
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->

     <Connector port="8082"
                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                enableLookups="false"
                acceptCount="100" debug="0" connectionTimeout="20000"
                proxyPort="80" disableUploadTimeout="true" />
</snip>

in your conf/server.xml.

I use this for other webapps, so I would assume that this works also for 
Xindice.

Additional security can be probably obtained with a proper configuration 
of your web server's firewall.

> 
> thanks
> John
> 


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
The Biocenter and            | Fax: +358-8-553-1141
     the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/