Page 1 of 1

Docker container & Apache2

Posted: Thu May 06, 2021 5:15 pm
by sscala
Linux Ubuntu:

I am trying to install the openkm-ce Docker-container container and use the regular (as in not a Docker container) Apache2 reverse proxy to allow external access.

The login-page does open, but when I try to log in as okmAdmin, the login-screen reloads (with a new session ID).

I started the docker container with:

Code: Select all

docker run --name openkm-ce -p openkm/openkm-ce
I added the in order to prevent direct access to the container from external sources.

The Apache-config file looks like this:

Code: Select all

<VirtualHost *:80>
  RedirectMatch ^/$ /OpenKM

  ProxyPreserveHost Off
  ProxyRequests Off

  ProxyPass /
  ProxyPassReverse /

  ErrorLog /var/log/apache2/openkm-error.log
  CustomLog /var/log/apache2/openkm-access.log combined
The "" is one of multiple domains pointing to the server.

Has anyone sucessfully managed to do this?

Re: Docker container & Apache2

Posted: Mon May 10, 2021 7:14 am
by pavila
AFAIK it should work. Which error is showing?

Re: Docker container & Apache2

Posted: Mon May 10, 2021 8:43 am
by sscala
It does not show any error. The openkm-error.log is clear and the openkm-access.log shows that it just opens another session after sending the login-data.

I just played around with the apache-conf-file and found a "solution":

It will work as long as you do not use "openkm" as subdomain. "" e.g. works perfectly fine.

I have no idea why.

Re: Docker container & Apache2

Posted: Mon May 10, 2021 2:38 pm
by pavila
I think this is due to the default hostname. Try changing it with the --hostname parameter when creating the container.