Alfresco 6.2 docker deployment behind HAproxy

cancel
Showing results for 
Search instead for 
Did you mean: 
acancio
Member II

Alfresco 6.2 docker deployment behind HAproxy

Hello everyone,

I'm trying to run Alfresco 6.2 with docker-compose behind an HAproxy. I have all containers up&running using this deployment: https://github.com/Alfresco/acs-community-deployment.git

 

Creating network "alfresco_default" with the default driver
Creating alfresco_share_1 ... done
Creating alfresco_transform-misc_1 ... done
Creating alfresco_alfresco-pdf-renderer_1 ... done
Creating alfresco_tika_1 ... done
Creating alfresco_activemq_1 ... done
Creating alfresco_postgres_1 ... done
Creating alfresco_solr6_1 ... done
Creating alfresco_alfresco_1 ... done
Creating alfresco_libreoffice_1 ... done
Creating alfresco_imagemagick_1 ... done
Creating alfresco_proxy_1 ... done

Over LAN its working perfectly, I can reach "http://server1:8080/share/page" and "http://server1:8080/alfresco".

I have an HAproxy and I want to expose the docker deployment into a certain URL without :8080 and with SSL certificate, but is not working.

Basically:                  https://docman.domain.com/share/page    -to->     http://server1:8080/share/page

The problem is that the nginx proxy container or the share container keeps rewriting the ":8080" port response, so I end up with:

https://docman.domain.com:8080/share/page

https://docman.domain.com:8080/alfresco

and if I manually remove the 8080, I can reach the URL correctly but the login doesn't work.

this is my very simple HAproxy conf,

frontend:

# DOCMAN
acl is___docman hdr(host) -i docman.domain.com
redirect  location          https://docman.domain.com/            code 301           if is___docman !{ ssl_fc }
use_backend                backend_docman                                                          if is___docman

backend backend_docman
                description DMS - General Purposes Alfresco
                option httpclose
                option forwardfor
                server docman server1:8080

 

I already try editing the share-security-config.xml file:

<token>Alfresco-CSRFToken</token>

<referer>https://docman.domain.com/.*</referer>

<origin>https://docman.domain.com</origin>

 

but it doesn't work.

 

Any help is welcome.

Best regards,

Angel

 

 

 

 

 

1 Reply
angelborroy
Alfresco Employee

Re: Alfresco 6.2 docker deployment behind HAproxy

You can try

https://github.com/Alfresco/alfresco-docker-installer

This project will produce a Docker Compose template with HA Proxy using NGINX.

Hyland Developer Evangelist