Running GeoNetqwork behind a reverse proxy [SEC=UNCLASSIFIED]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Running GeoNetqwork behind a reverse proxy [SEC=UNCLASSIFIED]

Jon Millard

Hi folks,

 

Really sorry if this has already been addressed somewhere else, but I’ve looked around and am yet to understand what the solution might be.

 

Problem: We are running GeoNetwork behind a reverse proxy arrangement which means its external presentation needs to be entirely different from its internal presentation within our DMZ.  Internally, we have GeoNetwork CSW endpoint running on <a href="http://[int-host]:8080/geonetwork/srv/eng/csw">http://[int-host]:8080/geonetwork/srv/eng/csw (as is the default), but externally shows as <a href="http://[ext-host]/services/catalogue/csw">http://[ext-host]/services/catalogue/csw.  Unfortunately I cannot get the GetCapabilities response content to match this external presentation.

 

The best I can do with the admin configuration screens in GeoNetwork settings is to change the host and port, but I cannot change the way the GetCapabilities response reports the rest of the URL.  I see in the documentation (docs/eng/users/admin/csw-configuration/index.html#configuration-using-geonetwork-overrides and docs/eng/users/admin/advanced-configuration/index.html#adv-configuration-overriddes) there is capacity to override just about any setting, but I am not sure if that can meet our needs or not.

 

Has anyone had experience with this, and can give me some pointers or examples to work with?

 

We are currently running version 2.10.4-0

 

Thanks in advance,

 

Jon


------------------------------------------------------------------------------

_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Running GeoNetqwork behind a reverse proxy [SEC=UNCLASSIFIED]

SimonPigot
Hi Jon,

Haven't had to do what you're proposing before but it seems perfectly reasonable to want to do that, so had a quick look at the code.

The GetCapabilities response is actually filled out from a template in your <webappdir>/xml/csw/capabilities.xml. The protocol, host, port etc are all filled out using info from the geonetwork system configuration but the general geonetwork service url pattern (ie. http://<hostname>/<servlet>/srv/<language>/<endpoint>) is assumed by the template. However looks to me like you can just change the lines that do this in that template to just use the hostname, port from gn system config and then use any other url components you like to make up the rest of the service url. To test it out I did this locally without issues so should work fine in practice (assuming your url rewriting/reverse proxying is ok, obviously!).

Cheers,
Simon
________________________________________
From: Jon Millard [[hidden email]]
Sent: Thursday, 20 August 2015 11:43 AM
To: [hidden email]
Subject: [GeoNetwork-devel] Running GeoNetqwork behind a reverse proxy  [SEC=UNCLASSIFIED]

Hi folks,

Really sorry if this has already been addressed somewhere else, but I’ve looked around and am yet to understand what the solution might be.

Problem: We are running GeoNetwork behind a reverse proxy arrangement which means its external presentation needs to be entirely different from its internal presentation within our DMZ.  Internally, we have GeoNetwork CSW endpoint running on http://[int-host]:8080/geonetwork/srv/eng/csw (as is the default), but externally shows as http://[ext-host]/services/catalogue/csw.  Unfortunately I cannot get the GetCapabilities response content to match this external presentation.

The best I can do with the admin configuration screens in GeoNetwork settings is to change the host and port, but I cannot change the way the GetCapabilities response reports the rest of the URL.  I see in the documentation (docs/eng/users/admin/csw-configuration/index.html#configuration-using-geonetwork-overrides and docs/eng/users/admin/advanced-configuration/index.html#adv-configuration-overriddes) there is capacity to override just about any setting, but I am not sure if that can meet our needs or not.

Has anyone had experience with this, and can give me some pointers or examples to work with?

We are currently running version 2.10.4-0

Thanks in advance,

Jon

------------------------------------------------------------------------------
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork