change context path

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
greengold
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 20, 2017 7:55 pm

change context path

Post by greengold » Fri Mar 17, 2017 1:14 pm

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!

greengold
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 20, 2017 7:55 pm

Re: change context path

Post by greengold » Fri Mar 17, 2017 1:39 pm

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...

jllort
Moderator
Moderator
Posts: 9374
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: change context path

Post by jllort » Sat Mar 18, 2017 5:25 pm


greengold
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 20, 2017 7:55 pm

Re: change context path

Post by greengold » Sun Mar 19, 2017 2:28 pm

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>

jllort
Moderator
Moderator
Posts: 9374
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: change context path

Post by jllort » Mon Mar 20, 2017 9:21 am

Might be the key is to apply some change here ( look at redirectmach ):

Code: Select all

RedirectMatch ^/OpenKM/$ /frontend

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest