Apache integration

47 views
Skip to first unread message

mrie...@gmail.com

unread,
Apr 29, 2018, 2:32:20 AM4/29/18
to MailArchiva
hi,
i am evaluating mailarchiva. yesterday i tried to config mailarchiva with apache. i followed the documenationt at http://help.mailarchiva.com/enterprise-apache-proxy but it didn't work very good.

1) for the apache config you say i have to use

ServerName site.com
ServerAlias www.site.com

JkUnMount /ws2 worker1
JkUnMount /wss2 worker1
SSLProxyEngine On
ProxyPreserveHost On
#ProxyRequests Off
ProxyPass /wss/ wss://localhost:8090/linkage
ProxyPass /ws/ ws://localhost:8090/linkage
ProxyPassReverse /ws/ ws://localhost:8090/linkage
ProxyPassReverse /wss/ wss://localhost:8090/linkage
JkMount /site* worker3

only worker1 is defined in workers.properties. what is worker3, just a typo?
when i change worker3 and use worker1 i can load mailarchiva. but

2) i can't search in mails and i get the error "Connect to websocket not possible". in firefox console i see that wss://myserver/... was called with an error

3) i have configured apache with SSL, so mailarchiva runs under ssl. i have mod_proxy_wstunnel and mod_jk enabled.

thanxs

Markus

mrie...@gmail.com

unread,
Apr 29, 2018, 2:59:38 AM4/29/18
to MailArchiva
i have tried different approaches. first integration with mod_jk following the documentation and then just as imple mod_proxy way with proxing to http://localhost:8090. in this case i got the websocket error (or was it in bot ways, tried it many times).

Markus

jamie

unread,
Apr 29, 2018, 5:28:50 AM4/29/18
to maila...@googlegroups.com
        The problem is your web sockets configuration. See below for an idea:

         JkMount /* worker1

         JkUnMount /ws2 worker1
         JkUnMount /wss2 worker1
         SSLProxyEngine On
         ProxyPreserveHost On
         #ProxyRequests Off
         ProxyPass /linkage ws://localhost:8090/linkage
         ProxyPass /linkage wss://localhost:8090/linkage


Jose Manuel Albarrán

unread,
Jul 14, 2022, 2:31:18 PM7/14/22
to MailArchiva
Hi, 

I suffered the same issue, and solved changing to worker1 (obviously, worker3 is a typo - lasting 5 years!!!).

But now I'm not able to login. The login script appears, but admin/admin does not work. And all the files refered in doc (server.conf, by example) does not exist)

jamie

unread,
Jul 15, 2022, 4:56:43 AM7/15/22
to MailArchiva
You could try an alternative method. See: http://help.mailarchiva.com/apacheproxy.

José Manuel Albarrán

unread,
Jul 16, 2022, 1:23:12 PM7/16/22
to MailArchiva
I solved. It's stupid thing, but before integrate Apache, at least has to connect once on 8090, to create ROOT and define admin password.

jamie

unread,
Jul 18, 2022, 2:51:42 AM7/18/22
to MailArchiva
Well done. You may also need to add Proxy system variable so that MailArchiva can determine client IP & protocol.

Set Proxy System Variable

To ensure that client IP addresses are logged correctly in the audit log, MailArchiva requires knowledge of the original request, its IP address, protocol and port. The Apache directive "ProxyPreserveHost On" ensures that the HTTP header's X-Forwarded-Host, X-Forwarded-Proto and X-Forwarded-Port are passed on. MailArchiva will look for these HTTP headers, provided that its Java system properties variable Proxy is set as follows:

Linux: Add -Dproxy=yes variable to CATALINA_OPTS in /opt/mailarchiva/server/startserver script
Windows: Right click tray icon, click Configure, select Java tab, In Java Options add -Dproxy=yes



jamie

unread,
Jul 18, 2022, 2:53:00 AM7/18/22
to MailArchiva
Restart MA after doing the above.
Reply all
Reply to author
Forward
0 new messages