Tolbxela
Tolbxela

Reputation: 5183

Domino Xpages with Reverse Proxy

I have a problem with Domino Web Server with an XPages Application which is placed behind some reverse proxy. The problem is, the proxy forwards all requests from the URL like h2tps://organization/test_server/ to the Domino Web Server.

This makes all links in the application brocken. And I don't know how to fix it.

For example, the login attempt will be redirected by the server to h2tps://organization/names.nsf?Login instead of h2tps://organization/test_server/names.nsf?Login

Have you any idea how to fix it?

Upvotes: 1

Views: 557

Answers (3)

Tolbxela
Tolbxela

Reputation: 5183

I have solved the problem with some efforts.

  1. At first I have moved the DB in the folder /test_server/.
  2. Then I have changed all static HTML links to use the /test_server/.
  3. With the option xsp.application.context.proxy=test_server I have changed the paths for internal XPages and Extensions Library resources.
  4. At the end I have to add some substitution rules on the Domino to prevent duplicated paths like /test_server/test_server/.

Now it seems to be working well.

The proposal from the proxy team was to use url rewrite on the Web Server. It can be done with Domino without doubt, but requires to develop a DNSAPI Addon (a dll written in C). And it doesn't look for me like an easy task.

Anyway, thanks a lot for your help!

Upvotes: 0

Sanmao
Sanmao

Reputation: 56

When using a reverse proxy, we recommend keeping the original URL unchanged. Because many redirects, Ajax requests, cookie are closely related to URL, if the URL changes, almost must go to modify the code.

This problem is especially serious in Domino, because in a lot of Javascript code that will be used in the absolute path, for example /names.nsf. As a comparison of Java applications in general will use relative paths (for example ../login).

The actual way to achieve URL unchanged: map the domain name of the original domino server (for example test.domino.xxx), to the reverse proxy server, and reverse proxy server via http HOST header to determine forwarded to which backend server, without the need to add additional path (for example test_server).

In IBM WebSeal example, this configuration is called virtual host junctions.

Upvotes: 3

user2316219
user2316219

Reputation: 334

Did you create a site document on the domino Server?

Upvotes: 1

Related Questions