Running OTM on a subdirectory (i.e. example.com/otm)

29 views
Skip to first unread message

mauricio...@gmail.com

unread,
Mar 26, 2019, 6:15:59 PM3/26/19
to opentreemap-user
Hi everyone!

I've been trying to set up an otm installation on a subdirectory and I can't find the correct settings. I'm a newbie with django (extensive rails experience though), so it can be my fault, but I think that some of the currently defined routes do not take into account the

    FORCE_SCRIPT_NAME = '/otm'

setting. Most links are generated with the correct prefix, but when logging in or out it redirects me to a url without it. Also the logo links to 'example.com' instead of 'example.com/otm'.

The whole setup is an nginx proxy with an external ip, redirecting /otm to the internal ip which is running otm with FORCE_SCRIPT_NAME as above.

    # relevant config on the proxy
    location /otm {
      include /etc/nginx/proxy_params;

      proxy_pass http://otm_upstream/;
    }

    upstream otm_upstream {
      server 10.158.0.4;
      keepalive 16;
    }

Any help would be greatly appreciated.
Reply all
Reply to author
Forward
0 new messages