Page 1 of 1

change context path

PostPosted:Fri Mar 17, 2017 1:14 pm
by greengold
Hi,
I'm trying to change context path of OpenKM in it's tomcat7 bundle.

What I did is that I created OpenKM.xml in ${catalina.home}/conf/Catalina/localhost with the following content:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<Context deployOnStartup="true" docBase="${catalina.home}/webapps/OpenKM" path="/OneDMS" reloadable="true">
    <Manager pathname=""/>
</Context>
but I can still access OKM just on the path 'localhost:8080/OpenKM/login.jsp' NOT on the '...8080/OneDMS/login.jsp'
so the question is: how to set this properly?

Thank you!

Re: change context path

PostPosted:Fri Mar 17, 2017 1:39 pm
by greengold
okey, I corrected that to:
Code: Select all
<Context deployOnStartup="true" docBase="OpenKM/" path="/OneDMS" reloadable="false">
    		<Manager pathname=""/>
</Context>
in server.xml

but I'm getting this when I go to [host:port]/OneDMS :
Image
http://imgur.com/a/igic5 ...then when I hit return to redirects to /OpenKM and proceeds well...

Re: change context path

PostPosted:Sat Mar 18, 2017 5:25 pm
by jllort

Re: change context path

PostPosted:Sun Mar 19, 2017 2:28 pm
by greengold
good suggestion.
however configuration in the link works partially: I am able to browse the login site under url Proxy url I have set, but when I try to login it redirects me back to the .../OpenKM/... url.
Code: Select all
<VirtualHost *:80>
  ServerName openkm.your-domain.com

  ProxyPass /OneDMS ajp://localhost:8009/OpenKM
  ProxyPassReverse /OneDMS http://localhost:8080/OpenKM

  ErrorLog /var/log/apache2/your-domain.com-error.log
  CustomLog /var/log/apache2/your-domain.com-access.log combined

  RewriteEngine on
  RewriteCond %{REQUEST_URI} /OpenKM*
  RewriteRule ^(/.*)$ http://localhost:8080$1 [P]

  RequestHeader edit X-GWT-Module-Base ^(http://onedms.com)/frontend/(.*)$ $1/OpenKM/frontend/$2
</VirtualHost>

Re: change context path

PostPosted:Mon Mar 20, 2017 9:21 am
by jllort
Might be the key is to apply some change here ( look at redirectmach ):
Code: Select all
RedirectMatch ^/OpenKM/$ /frontend