Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache 2.4 HTTPS Reverse Proxy Documentation Request #77

Open
sempervictus opened this issue Feb 8, 2021 · 0 comments
Open

Apache 2.4 HTTPS Reverse Proxy Documentation Request #77

sempervictus opened this issue Feb 8, 2021 · 0 comments
Assignees
Labels

Comments

@sempervictus
Copy link

The documentation around reverse proxy configuration is a bit confusing, and i'm currently unable to get the setup working on a single host with mattermost using a valid LDAPS configuration (required the port number in the ldap_host variable) which i can use to authenticate if i simply access mattermost-LDAP directly. I've got the virtualhost for the ldap URL listening on localhost:12080 and mattermost bound on localhost:8065 with the apache reverse proxy listening on 443 and passing back and forth with mattermost. I've configured mattermost to treat its own https://fqdn as the gitlab server with the gitlab URI's configured under its own FQDN.
The apache virtualhost current looks like:

<VirtualHost *:443>
    ServerName host.domain.tld

    ProxyPreserveHost On
    RewriteEngine On
    RewriteCond %{REQUEST_URI} /api/v[0-9]+/(users/)?websocket [NC,OR]
    RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR]
    RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
    RewriteRule .* ws://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L]

    <Location />
        Require all granted
        ProxyPass http://127.0.0.1:8065/
        ProxyPassReverse http://127.0.0.1:8065/
        ProxyPassReverseCookieDomain 127.0.0.1 svl-arch00.lab.hq.svit.local
    </Location>

    <Location /api/v4/user>
        Require all granted
        ProxyPass http://localhost:12080/resource.php
        ProxyPassReverse http://localhost:12080/resource.php
        ProxyPassReverseCookieDomain 127.0.0.1 <%= @hostname %>
    </Location>

    <Location /oauth/token>
        Require all granted
        ProxyPass http://localhost:12080/token.php
        ProxyPassReverse http://localhost:12080/token.php
        ProxyPassReverseCookieDomain 127.0.0.1 <%= @hostname %>
    </Location>

    <Location /oauth/authorize>
        Require all granted
        ProxyPass http://localhost:12080/authorize.php
        ProxyPassReverse http://localhost:12080/authorize.php
        ProxyPassReverseCookieDomain 127.0.0.1 <%= @hostname %>
    </Location>

Unfortunately this doesn't work as the link for "sign in with gitlab" points to https://host.domain.tld/oauth/gitlab/login and that goes nowhere (brings back to the main login page).

What's the right way to do this with mm and the ldap proxy set up on a single host with Apache?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants