Menu

#41 Base url setting for generated/absolute url

1.0
open
2017-01-31
2017-01-27
No

It would be nice to have the url of e.g. /servmedia/... constructed using custom parameters. Currently, whole url is constructed as:
request.getContextPath() + "/servmedia/" + ...

I propose to use custom setting provided in either property file or directly via web interface in administration section.

Reason behind is that in case of having tomcat behind http server which proxies the content, the result of request.getContextPath() is http://127.0.0.1:8080/docmenta. Therefore, images and stylesheets are not available.

Thanks

Discussion

  • Manfred P.

    Manfred P. - 2017-01-31

    Hi,
    Adding a custom setting in the administration section seems to be a good idea. It will probably be added in one of the next releases.

    Just in case you didn't try it yet: if you are using Tomcat, maybe following is a solution for your problem: http://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html
    Furthermore, if you're using Apache as Proxy, adding "ProxyPreserveHost On" to the httpd.conf may also help.

     
    • Ladislav Lencucha

      Hi,

      thanks, the feature would be really nice to have.

      Yes, we're currently using it as you suggested. In case multiple virtual hosts have proxy to the same tomcat, additional connectors must be defined, which is not always easy to achieve when server/security administrators are stubborn :-)

      Thanks again

       

Log in to post a comment.