Links to documents in OpenKM are not working

Symptoms

Links to documents in OpenKM are not working.

Cause

There are several causes:

  • You have changed the application URL.
  • You have configured SSL and have not correctly redirected the HTTP URLs to HTTPS.
  • After an application upgrade, the URL has changed. Previously /OpenKM/frontend/index.jsp?uuid=XXXX is now /OpenKM/frontend/index?uuid=XXXX

Solution

The easiest way to solve it is with an Apache Redirect configuration, but it all depends on the type of URL change. Here are some samples:

If you changed the application URL and added SSL at the same time:

<VirtualHost *:80>
  ServerName old.your-domain

  RewriteEngine on
  RewriteCond %{SERVER_NAME} = old.your-domain
  RewriteRule ^ https://new.your-domain.com/%{REQUEST_URI} [L,QSA,R=permanent]

</VirtualHost>

If index.jsp? has been changed in favour of index?:

<VirtualHost *:80>
  ServerName openkm.your-domain.com
  RedirectMatch ^/$ /OpenKM

  # WebSocket support - needs proxy-wstunnel
  ProxyPass /OpenKM/frontend/webSocket ws://127.0.0.1:8080/OpenKM/frontend/webSocket
  ProxyPassReverse /OpenKM/frontend/webSocket ws://127.0.0.1:8080/OpenKM/frontend/webSocket

  ProxyPass /OpenKM ajp://127.0.0.1:8009/OpenKM keepalive=On
  ProxyPassReverse /OpenKM http://openkm.your-domain.com/OpenKM

  # Redirect
  Redirect 301 /OpenKM/frontend/index.jsp http://openkm.your-domain.com/OpenKM/frontend/index

  ErrorLog /var/log/apache2/openkm-error.log
  CustomLog /var/log/apache2/openkm-access.log combined
</VirtualHost>

Properties

Properties

Date

2017-03-24

Applies to

  • Frontend.
  • Third-party software integration.