• Using a different URL than the default OpenKM

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #47113  by resnicke
 
I want to redirect my OpenKM (version 6.3.2 on Ubuntu 16.04.5) so that the users see a different URL than the default - for example http://ip_address/ByDOCS. I also need the user to see the WebDAV URL of http://ip_address/ByDOCS/webdav
I have made the following changes:
- linked webapps/ByDOCS -> webapps/OpenKM
- edited webapps/ROOT/index.jsp to use /ByDOCS
- edited some titles in .jsp files under admin
- changed all the ico and giffs and updated the Administration page

I receive the following errors in catalina.log when trying http://ip_address/ByDOCS/login.jsp:
Code: Select all
       ERROR org.hibernate.connection.DatasourceConnectionProvider- Could not find datasource: java:/comp/env/jdbc/ByDOCSDS
On the browser when I go to http://ip_address/ByDOCS/login.jsp I get the following error message:
       Class: 	org.apache.jasper.JasperException
       Message: 	javax.servlet.ServletException: java.lang.ExceptionInInitializerError
When I try http://ip_address/ByDOCS/webdav I get the following error in the localhost_access_log file plus a similar error as above in the catalina.log:
Code: Select all
       "GET /ByDOCS/webdav HTTP/1.1" 500 1246
following message in the browser:
       Class: 	java.lang.ExceptionInInitializerError
       Message: 	null
 #47125  by jllort
 
The right way for doing it is rewritting the URL with a proxy in the front. Here you will find some https://docs.openkm.com/kcenter/view/ok ... t-url.html

Seems you have changed something in the source code and now is looking for a database source set in the server.xml what not exists.
 #47136  by resnicke
 
I'm still working on the change of context with no success.
You pointed me to a solution base don Apache but I am using tomcat as the http server so I'm a little confused (in any case I couldn't get the new context to work).

Wrt the comment that I've made changes to source files, all I can find are changes where I have made to text strings replacing OpenKM with ByDOCS or graphic files:
Code: Select all
~/tomcat/webapps$ find . -type f -mtime -30 -exec ls -l {} \;
-rw-rw-r-- 1 openkm openkm 1150 Dec  2 17:37 ./OpenKM/img/ByD-logo-favicon.ico
-rw-rw-r-- 1 bynet bynet 1142 Dec  3 09:10 ./OpenKM/img/ByDOCS-logo-tiny.gif
-rw-rw-r-- 1 openkm openkm 510 Dec  2 17:23 ./OpenKM/img/ByDOCS-logo-favicon.ico
-rw-r--r-- 1 openkm openkm 1472 Nov 29 17:08 ./OpenKM/unauthorized.jsp
-rw-r--r-- 1 openkm openkm 3163 Nov 29 17:11 ./OpenKM/admin/benchmark.jsp
-rw-r--r-- 1 openkm openkm 2659 Nov 29 17:12 ./OpenKM/admin/home.jsp
-rw-r--r-- 1 openkm openkm 3216 Nov 29 17:12 ./OpenKM/admin/index.jsp
-rw-r--r-- 1 openkm openkm 2107 Nov 29 17:08 ./OpenKM/password_reset.jsp
-rw-rw-r-- 1 openkm openkm 1150 Dec  3 09:58 ./OpenKM/ByD-logo-favicon.ico
-rw-r--r-- 1 openkm openkm 2480 Nov 29 17:07 ./OpenKM/error.jsp
-rw-r--r-- 1 openkm openkm 4828 Nov 29 17:07 ./OpenKM/login_desktop.jsp
-rw-r--r-- 1 openkm openkm 84 Dec  3 10:50 ./ROOT/index-OpenKM.jsp
-rw-r--r-- 1 openkm openkm 84 Dec  3 10:51 ./ROOT/index-ByDOCS.jsp
I have attached the last catalina.out log file which I'd appreciate it if you could give me some more directions.
Attachments
Log file with java error: Name [ByDOCSDS] is not bound in this Context. Unable to find [ByDOCSDS]
(49.12 KiB) Downloaded 133 times
 #47160  by resnicke
 
I tried using the document to which you referred but to no avail - I still am only successful with the OpenKMS URL.
I have implemented my OpenKMS using tomcat and its not clear to me how the apache addiditon will work with tomcat - don't I have to make the appropriate changes to the tomcat server?

I have a compressed tar file of a clean start of tomcat from the tomcat/logs direcrtory - maybe this will assist.

Wrt to the changes in the code - I searched my changes and I only altered places where HTML tags referred to OpenLM and I wanted a different tag. The files that I touched are below and I've included them in a separate compressed tar bundle if that will help.
Code: Select all
OpenKM/unauthorized.jsp
OpenKM/admin/benchmark.jsp
OpenKM/admin/home.jsp
OpenKM/admin/index.jsp
OpenKM/password_reset.jsp
OpenKM/error.jsp
OpenKM/login_desktop.jsp
ROOT/index-OpenKM.jsp
ROOT/index-ByDOCS.jsp
Attachments
tomcat log files
(49.12 KiB) Downloaded 135 times
altered files under tomcat/webapps
(5.08 KiB) Downloaded 129 times
 #47164  by jllort
 
I continue suggesting using rewrite URL from apache2 web service. First publish OpenKM behind apache and then try to rewrite the context

First try to success with standard reverse proxy
https://docs.openkm.com/kcenter/view/ok ... proxy.html

Then try to work with ( do not forget to enable the configuration parameter system.apache.request.header.fix )
https://docs.openkm.com/kcenter/view/ok ... t-url.html

In the sample OpenKM is totally removed by /

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.