jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-1655

Proxy base URL seems does not work as expected

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.6.0-RC2
  • Fix Version/s: 1.6.4
  • Component/s: Configuration
  • Labels:
    None
  • Environment:
    Windows Server 2003, Java 1.6, Tomcat 6 working behing a reverse proxy.

Description

I need to specify a proxy base like http://mysite.mydomain/tools/. I have specificed a proxy base of http://mysite.mydomain/tools/ but the URL that shows up in Geoserver is only http://mysite.mydomain/geoserver instead of http://mysite.mydomain/tools/geoserver. The forward slash seems to be ignored.

Issue Links

relates to

Improvement - An improvement or enhancement to an existing feature or task. GEOS-1918 Add a servlet filter that does the reverse proxy work in translating html and javascript urls to the proxy based ones

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Jason Pickering added a comment - 08/Jan/08 12:41 PM

I would add a comment here, as after reading this one more time, I will clarify a bit the problem...

I need to specify a proxy base like http://mysite.mydomain/tools/. I have specificed a proxy base of http://mysite.mydomain/tools/ but the URL that shows up in Geoserver is only http://mysite.mydomain/geoserver instead of http://mysite.mydomain/tools/geoserver. Everything after http://mydomain.mysite/ seems to be ignored.

Show
Jason Pickering added a comment - 08/Jan/08 12:41 PM I would add a comment here, as after reading this one more time, I will clarify a bit the problem... I need to specify a proxy base like http://mysite.mydomain/tools/. I have specificed a proxy base of http://mysite.mydomain/tools/ but the URL that shows up in Geoserver is only http://mysite.mydomain/geoserver instead of http://mysite.mydomain/tools/geoserver. Everything after http://mydomain.mysite/ seems to be ignored.
Hide
Permalink
Andrea Aime added a comment - 08/Jan/08 12:47 PM

Saul, you should be familiar with the proxy code. Does anything in this report ring a bell for you? Like, knowing more or less where the issue could be in the code?

Show
Andrea Aime added a comment - 08/Jan/08 12:47 PM Saul, you should be familiar with the proxy code. Does anything in this report ring a bell for you? Like, knowing more or less where the issue could be in the code?
Hide
Permalink
Jason Pickering added a comment - 08/Jan/08 1:01 PM

One more comment, in my case, this does not seem to affect anything other than the default UI, which I do not want to be exposed anyway. In my case, http://www.who.int/tools/geoserver/ should expose the default admin UI, which I do not want, except through my intranet. However requests such as
http://www.who.int/tools/geoserver/wfs?request=GetCapabilities will work, due to rules defined in my proxy.

Show
Jason Pickering added a comment - 08/Jan/08 1:01 PM One more comment, in my case, this does not seem to affect anything other than the default UI, which I do not want to be exposed anyway. In my case, http://www.who.int/tools/geoserver/ should expose the default admin UI, which I do not want, except through my intranet. However requests such as http://www.who.int/tools/geoserver/wfs?request=GetCapabilities will work, due to rules defined in my proxy.
Hide
Permalink
Saul Farber added a comment - 08/Jan/08 3:50 PM

Hmm. Nothing jumps out at me. I'll try doing it with extra trailing directories and see if it fails for me in the same way.

Jason: just to confirm, this is on 1.6.0_RC2, right?

Show
Saul Farber added a comment - 08/Jan/08 3:50 PM Hmm. Nothing jumps out at me. I'll try doing it with extra trailing directories and see if it fails for me in the same way. Jason: just to confirm, this is on 1.6.0_RC2, right?
Hide
Permalink
Saul Farber added a comment - 09/Jan/08 2:27 PM

OK, I just looked at this and I'm somehow convinced that the problem has to do with using absolute paths in the jsp construction in geoserver.

I think that struts is creating paths with code like this (although I have no idea where...)

<a href="/geoserver/config/index.do">main</a>

I tried poking around in "menuator.jsp" to see if I could figure out what was going on in there, but it was pretty obscure.

Note that the proxy_url is completely respected inside all the WMS/WFS/WCS code...this is purely a UI problem with disregarding the subsequent path information after the host info. How does the UI know how to write its links? Where is the UI hooked up to the PROXY_URL info? That point might have more of an answer...

Show
Saul Farber added a comment - 09/Jan/08 2:27 PM OK, I just looked at this and I'm somehow convinced that the problem has to do with using absolute paths in the jsp construction in geoserver. I think that struts is creating paths with code like this (although I have no idea where...) <a href="/geoserver/config/index.do">main</a> I tried poking around in "menuator.jsp" to see if I could figure out what was going on in there, but it was pretty obscure. Note that the proxy_url is completely respected inside all the WMS/WFS/WCS code...this is purely a UI problem with disregarding the subsequent path information after the host info. How does the UI know how to write its links? Where is the UI hooked up to the PROXY_URL info? That point might have more of an answer...
Hide
Permalink
Eduin Carrillo added a comment - 28/Mar/08 3:15 AM

Using GeoServer 1.6.2, this bug persists.

I'm trying to install GS in http://www.publicserver.org/subdirectory/geoserver/ from http://myintranetserver:8080/geoserver

Using Apache:

ProxyPass /subdirectory/ http://myintranetserver:8080/
ProxyPassReverse /subdirectory/ http://myintranetserver:8080/

Proxy base URL: http://www.publicserver.org/subdirectory/

GetCapabilities URLs and contents are ok:
http://www.publicserver.org/subdirectory/geoserver/wcs?service=WCS&request=GetCapabilities
http://www.publicserver.org/subdirectory/geoserver/wms?service=WMS&request=GetCapabilities
http://www.publicserver.org/subdirectory/geoserver/wfs?service=WFS&request=GetCapabilities

but UI is broken with URLs like these:
http://www.publicserver.org/geoserver/demo.do;jsessionid=p7jks7s9jbii
http://www.publicserver.org/geoserver/config/index.do;jsessionid=p7jks7s9jbii

HTML code looks like this:

********************
<a href="/geoserver/config/index.do;jsessionid=p7jks7s9jbii" style="" title="Configuration of GeoServer application">Config</a>

</td>
</tr>

<tr>
<td>

<a href="/geoserver/demo.do;jsessionid=p7jks7s9jbii" style="" title="Here is the demo page for Geoserver. Look here for examples on how to use Geoserver on its own and with other tools.">Demo</a>
*********************

Show
Eduin Carrillo added a comment - 28/Mar/08 3:15 AM Using GeoServer 1.6.2, this bug persists. I'm trying to install GS in http://www.publicserver.org/subdirectory/geoserver/ from http://myintranetserver:8080/geoserver Using Apache: ProxyPass /subdirectory/ http://myintranetserver:8080/ ProxyPassReverse /subdirectory/ http://myintranetserver:8080/ Proxy base URL: http://www.publicserver.org/subdirectory/ GetCapabilities URLs and contents are ok: http://www.publicserver.org/subdirectory/geoserver/wcs?service=WCS&request=GetCapabilities http://www.publicserver.org/subdirectory/geoserver/wms?service=WMS&request=GetCapabilities http://www.publicserver.org/subdirectory/geoserver/wfs?service=WFS&request=GetCapabilities but UI is broken with URLs like these: http://www.publicserver.org/geoserver/demo.do;jsessionid=p7jks7s9jbii http://www.publicserver.org/geoserver/config/index.do;jsessionid=p7jks7s9jbii HTML code looks like this: ******************** <a href="/geoserver/config/index.do;jsessionid=p7jks7s9jbii" style="" title="Configuration of GeoServer application">Config</a> </td> </tr> <tr> <td> <a href="/geoserver/demo.do;jsessionid=p7jks7s9jbii" style="" title="Here is the demo page for Geoserver. Look here for examples on how to use Geoserver on its own and with other tools.">Demo</a> *********************
Hide
Permalink
Andrea Aime added a comment - 02/Apr/08 12:31 PM

I looked into this a bit, unfortunatley it seems it's going to require extensive changes. All the jsp pages do have a baseUrl, but then all links are using something /path/to/url, the initial / makes the browser link to the geoserver root anyways forgetting about the extra items in the path...

Show
Andrea Aime added a comment - 02/Apr/08 12:31 PM I looked into this a bit, unfortunatley it seems it's going to require extensive changes. All the jsp pages do have a baseUrl, but then all links are using something /path/to/url, the initial / makes the browser link to the geoserver root anyways forgetting about the extra items in the path...
Hide
Permalink
Andrea Aime added a comment - 03/Apr/08 4:32 AM

Looked more. The links in our UI are generated by struts using <html:link forward="forwardName"> where forward is a forward to an action in struts.xml, such as "config", or in tiles-defs.xml.
Unfortunately I have no understanding oh how the UI is put togheter (the person that coded it is long gone) and I can't find the definition of various forwards used in the UI, so I guess this one will stay unsolved until we redo the UI with a different technology

Show
Andrea Aime added a comment - 03/Apr/08 4:32 AM Looked more. The links in our UI are generated by struts using <html:link forward="forwardName"> where forward is a forward to an action in struts.xml, such as "config", or in tiles-defs.xml. Unfortunately I have no understanding oh how the UI is put togheter (the person that coded it is long gone) and I can't find the definition of various forwards used in the UI, so I guess this one will stay unsolved until we redo the UI with a different technology
Hide
Permalink
Gabriel Roldán added a comment - 25/Apr/08 11:13 AM

ok, worked on the issue with the decision we took of getting rid of doing the reverse proxy work at the application level. That is, we're currently handling the links in the ui in order to adapt all urls to the proxy base url if there's a proxy url set in geoserver.
The point is that proxy base url is, or should be, only to set up friendly urls in our OWS responses, like schema locations and the like, not to do the job of the reverse proxy. This way, a site wanting to expose the ui through a proxy server can still do that by properly configuring the proxy server, without breaking the configuration from inside the local server or intranet

Show
Gabriel Roldán added a comment - 25/Apr/08 11:13 AM ok, worked on the issue with the decision we took of getting rid of doing the reverse proxy work at the application level. That is, we're currently handling the links in the ui in order to adapt all urls to the proxy base url if there's a proxy url set in geoserver. The point is that proxy base url is, or should be, only to set up friendly urls in our OWS responses, like schema locations and the like, not to do the job of the reverse proxy. This way, a site wanting to expose the ui through a proxy server can still do that by properly configuring the proxy server, without breaking the configuration from inside the local server or intranet
Hide
Permalink
Gabriel Roldán added a comment - 25/Apr/08 3:18 PM

Jason I'm marking the issue resolved waiting for you to test it out.
For your specific use case, it would be enough testing to pick up tonights nightly and verify you can normally use the config ui through your intranet even with a baseProxyUrl set up in geoserver.

Show
Gabriel Roldán added a comment - 25/Apr/08 3:18 PM Jason I'm marking the issue resolved waiting for you to test it out. For your specific use case, it would be enough testing to pick up tonights nightly and verify you can normally use the config ui through your intranet even with a baseProxyUrl set up in geoserver.
Hide
Permalink
Gabriel Roldán added a comment - 13/May/08 11:14 AM

Closing the issue, I've tested deeply for a while now and also added a fully working reverse proxy filter that can be enabled through web.xml if exposing the UI through the proxy server is needed

Show
Gabriel Roldán added a comment - 13/May/08 11:14 AM Closing the issue, I've tested deeply for a while now and also added a fully working reverse proxy filter that can be enabled through web.xml if exposing the UI through the proxy server is needed

People

  • Assignee:
    Gabriel Roldán
    Reporter:
    Jason Pickering
Vote (0)
Watch (1)

Dates

  • Created:
    08/Jan/08 4:29 AM
    Updated:
    13/May/08 11:14 AM
    Resolved:
    25/Apr/08 3:18 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.