Mattermost Peer-to-Peer Forum

No sign-in methods are enabled


#1

Summary

After installing Mattermost I get the error message: “No sign-in methods are enabled.”

Steps to reproduce

We have installed:

Version: 5.5.0
Build Number: 5.5.1
Build Date: Thu Dec  6 09:21:58 UTC 2018
Build Hash: 826252252404c13bf564a8c4fd51616fc2cc4df9
Build Enterprise Ready: true
DB Version: 5.5.0

And we have configured the Apache2 setup:

https://docs.mattermost.com/install/config-apache2.html#

Expected behavior

I expect, that I get any kind of login dialog.

Observed behavior

This is all I get:


#2

The problem seems to be triggered by setting ServiceSettings.SiteURL. When I leave the setting empty, I get a HTML page, when I run curl http://localhost:8065. But when I set the parameter, I get just:

# curl http://localhost:8065
<a href="/mattermost">Found</a>.

Is this the intended behaviour?


#3

Hi @ceving,

We would need more details on your config settings, but normally these settings should be enabled:

Also, the site URL should be set in System Console.


#4

The problem seems to be the Apache configuration. The Mattermost documentation explains how to pass all requests to a Mattermost server:

<VirtualHost *:80>
  # If you're not using a subdomain you may need to set a ServerAlias to:
  # ServerAlias www.mydomain.com
  ServerName mysubdomain.mydomain.com
  ServerAdmin hostmaster@mydomain.com
  ProxyPreserveHost On

  # Set web sockets
  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 mysubdomain.mydomain.com
  </Location>

</VirtualHost>

But this does not match our setup. We want to pass the traffic to three different processes.

/jira to localhost:8080/jira
/confluence to localhost:8090/confluence
/mattermost to localhost:8065/mattermost

Our problem is, that we are not sure how to rewrite the Apache configuration to achieve this.


#5

This configuration solved the problem:

  RewriteEngine On

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

  <Location /mattermost>
    Require                      all granted
    ProxyPass                    http://localhost:8065/mattermost
    ProxyPassReverse             http://localhost:8065/mattermost
    ProxyPassReverseCookieDomain localhost fqdn
  </Location>