We're Hiring!

Mattermost, Inc.

Mattermost send email notification problems

That you for the information!

Can I ask

  • What web server you are using, since you’re not using Apache or Nginx?
  • Why are you unable to use port 80, and can we use port 443 with HTTPS?

Dear @XxLilBoPeepsxX,
I would like to answer you following questions:

  1. Our company does not use any web server. For site URL, invisiblenotes.com is applied from online host domain site. Then, the staff uses router to set port number to point site URL.

  2. Port 80 is already used for other software. You can port 443 with HTTPS.
    Thank you.

Thank you for your response, I can definitely set up port 443 with HTTPS, that is more than doable! We will need to install either Apache or Nginx web server, which shouldn’t be an issue at all, and will greatly improve the security and stability of your Mattermost installation.
What specifically is the domain name that you want to have your Mattermost instance running on? (Ex. mydomain.com, or subdomain.mydomain.com, etc)
I just want to double-check to make sure that we both are on the same page :slight_smile:

Dear @XxLilBoPeepsxX,
I would like to inform you that there is no specifically domain name that I want to have your Mattermost instance running on. Thank you.

Alright, thats no issue. Do you have access to your domain’s DNS records, if we were to add an entry for a new subdomain?

Dear @XxLilBoPeepsxX,
I just have the DNS records on CentOS 8 operation system. Please refer to below image. Thank you.
Screenshot from 2020-11-26 10-21-48

Yes, and that is correct, that is the Google DNS Server. Who is your domain registrar, if I can ask?

Dear @XxLilBoPeepsxX,
I would like to replay you that the domain registrar is my boss. Thank you.

Okay so if we wanted to, for example, use the domain name chat.example.com, would your boss be able to setup that domain to point to the IP address of the server for us?

Dear @XxLilBoPeepsxX,
Yes, my boss will be able to setup that domain to point to the IP address of the server for you. Thank you.

That’s great, thank you for checking!
Last question:

Do you have snapd installed on your server, or should I include steps for how to install that?

Dear @XxLilBoPeepsxX,
I would like to reply you that I do not have snapd installed on my server. Please include steps for how to install that. Thank you.

Alright, sounds good.

Run these commands to install snapd to your CentOS 8 OS.

FIrst we are going to add the CentOS 8 snapd repository to your package manager, and then install CertBot and the python dependencies to run CertBot, using the following commands:

sudo dnf install epel-release
sudo dnf install certbot python3-certbot-apache mod_ssl

Next, we want to install the Apache web server, which will allow us to set our VHOST as well as configure our reverse proxy, and apply our HTTPS certificate that will be generated for the domain name that you choose to use.
You can install Apache with the following command:

sudo dnf install httpd




Since we are going to be serving your Mattermost instance over HTTPS, we need to change the firewall to allow traffic on port 443. To do this, run the following command:

sudo firewall-cmd --permanent --add-service=https

Now that we have made the change, reload the firewall to apply the change:

sudo firewall-cmd --reload


Apache does not automatically start on CentOS once the installation completes, so you will need to start the Apache process manually:
sudo systemctl enable httpd && sudo systemctl start httpd

Verify that the service is running with the following command:

sudo systemctl status httpd

You will receive an active status when the service is running:

Output● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disa>
   Active: active (running) since Thu 2020-04-23 22:25:33 UTC; 11s ago
     Docs: man:httpd.service(8)
 Main PID: 14219 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 5059)
   Memory: 24.9M
   CGroup: /system.slice/httpd.service
           ├─14219 /usr/sbin/httpd -DFOREGROUND
           ├─14220 /usr/sbin/httpd -DFOREGROUND
           ├─14221 /usr/sbin/httpd -DFOREGROUND
           ├─14222 /usr/sbin/httpd -DFOREGROUND
           └─14223 /usr/sbin/httpd -DFOREGROUND

...

Let me know if you have any issues with this step, if there are, we will figure them out, and then continue onwards to get everything set up!

Dear @XxLilBoPeepsxX,
I followed the steps, but when I typed sudo systemctl enable httpd && sudo systemctl start httpd , it show below problem:


While I run journalctl -xe command, it showed:

When I run systemctl status httpd.service, it displayed

Please help me to solve the problems. Thank you.

Ahh my bad, I see where the issue was. It auto-enabled httpd on install, so we did not need to enable the httpd package ourselves once we installed it, as it was already done for us.

Try

sudo systemctl restart httpd

And then running

sudo systemctl status httpd

Does this work?

Dear @XxLilBoPeepsxX,
I would like to reply you that it doesn’t work. Please refer to below image. Thank you.

Alright, it seems to be a syntax error with the BackupPC.conf file in the httpd server’s configuration files. Would you provide the contents of this file by running the command here, and then pasting the output in code format in your reply so we can fix the error and continue with the setup? The command is: cat /etc/httpd/conf.d/BackupPC.conf

Dear @XxLilBoPeepsxX,
Below is the contents of BackupPC.conf file. Thank you.

# BackupPC requires valid authentication in order for the web interface to
# function properly.  One can view the web interface without authentication
# though all functionality is disabled.
# 
# htpasswd -c /etc/BackupPC/apache.users yourusername
  

AuthType Basic
AuthUserFile /etc/BackupPC/apache.users
AuthName "ada BackupPC"

<IfModule mod_authz_core.c>
  # Apache 2.4
  <RequireAll>
    Require valid-user
    <RequireAny>
      #Require local
    </RequireAny>
  </RequireAll>
</IfModule>
<IfModule !mod_authz_core.c>
  # Apache 2.2
  order deny,allow
  deny from all
  allow from 127.0.0.1
  allow from ::1
  require valid-user
</IfModule>

</DirectoryMatch>


Alias           /BackupPC/images        /usr/share/BackupPC/html/
ScriptAlias     /BackupPC               /usr/libexec/BackupPC/BackupPC_Admin
ScriptAlias     /backuppc               /usr/libexec/BackupPC/BackupPC_Admin

Hello! Thank you for providing that, I see that line 17 is

so I believe that if you uncomment the line, by removing the #, to end with Require local and then attempt to restart the server, that it hopefully will work. Let me know!

Dear @XxLilBoPeepsxX,
I would like to inform you that it work. Please refer to below image. Thank you.

1 Like