• SOLVED - Configuring Apache HTTP Reverse-Proxy

  • 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.
 #45024  by maniachhz
 
Hi guys,

I read the manual: https://docs.openkm.com/kcenter/view/ok ... proxy.html

then done:
step-1. changed the port to 8181
Code: Select all
huanghanzhen@function:~$ cat /etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

#Listen 80
Listen 8181

<IfModule ssl_module>
	Listen 443
</IfModule>

<IfModule mod_gnutls.c>
	Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
huanghanzhen@function:~$ 
step-2. added the redmine_openkm.conf, and enable the site
Code: Select all
huanghanzhen@function:~$ cat /etc/apache2/sites-available/redmine_openkm.conf
<VirtualHost *:8181>
    #SSLEngine On
    #SSLCertificateFile /etc/ssl/certs/redmine_openkm.crt
    #SSLCertificateKeyFile /etc/ssl/private/redmine_openkm.key

    ServerAdmin hanzhenhuang@function-g.com
    Servername localhost
    DocumentRoot /var/www/html/
    redirectMatch ^/openkm.* /OpenKM
    redirectMatch ^/$ /redmine/

     <Location /redmine>
         RailsEnv production
         RackBaseURI /redmine
         Options -MultiViews
    </Location>

    <Location /OpenKM>
        #ProxyRequests Off
        #ProxyPreserveHost On
        ProxyPass ajp://127.0.0.1:8009/OpenKM keepalive=On
        ProxyPassReverse http://localhost:8181/OpenKM
        
    </Location>

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


</VirtualHost>
step-3. changed the OpenKM default port to:8181
Code: Select all
    <Connector port="8181" address="0.0.0.0" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
step-4.
Code: Select all
$ sudo /etc/init.d/apache2 start
$ sudo /opt/openkm/tomcat/bin/catalina.sh start 
Finishing above steps, the OpenKM works when i visit: http://xxxx:8181/OpenKM

My questions:
1. do i need add the port to
Code: Select all
 ProxyPassReverse http://localhost:8181/OpenKM 
on step-2 ?

2. do i need change the openkm to 8181? if i don't update 8080 to 8181, the OpenKM does not work.

In a word, is there a mistake in my operation above?

Thanks.
Last edited by maniachhz on Fri Dec 08, 2017 10:41 am, edited 1 time in total.
 #45025  by maniachhz
 
Never mind.

comment <Connector ... item on the step-3, the OpenKM works.
step-3. changed the OpenKM default port to:8181
<Connector port="8181" address="0.0.0.0" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

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.