Skip to content

Commit a1515c5

Browse files
committed
Changes to make files work for multiple installs (rhel, ubuntu)
1 parent 732286d commit a1515c5

File tree

5 files changed

+99
-47
lines changed

5 files changed

+99
-47
lines changed

source/install/config-proxy-nginx.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,15 @@ Configuring NGINX as a proxy for Mattermost Server
6969

7070
5. Restart NGINX.
7171

72+
On Ubuntu 14.04 and RHEL 6.6:
73+
7274
``sudo service nginx restart``
75+
76+
On Ubuntu 16.04 and RHEL 7.1:
77+
78+
``sudo systemctl restart nginx``
7379

74-
6. Verify you can see Mattermost thru the proxy.
80+
6. Verify that you can see Mattermost thru the proxy.
7581

7682
``curl http://localhost``
7783

source/install/config-ssl-http2-nginx.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ You can use any certificate that you want, but these instructions show you how t
2525

2626
5. Stop NGINX.
2727

28+
On Ubuntu 14.04 and RHEL 6.6:
29+
2830
``sudo service nginx stop``
31+
32+
On Ubuntu 16.04 and RHEL 7.1:
33+
34+
``sudo systemctl stop nginx``
2935

3036
6. Run ``netstat`` to make sure that nothing is listening on port 80.
3137

@@ -37,7 +43,7 @@ You can use any certificate that you want, but these instructions show you how t
3743

3844
When prompted, enter your domain name. The certificate is located in ``/etc/letsencrypt/live``
3945

40-
8. Open the file ``/etc/nginx/sites-available/mattermost`` as root and update it to incorporate the following lines. Make sure that you use your own values for the Mattermost server IP address and FQDN for *server_name*.
46+
8. Open the file ``/etc/nginx/sites-available/mattermost`` as root in a text editor and update it to incorporate the following lines. Make sure that you use your own values for the Mattermost server IP address and FQDN for *server_name*.
4147

4248
.. code-block:: none
4349
@@ -106,7 +112,13 @@ You can use any certificate that you want, but these instructions show you how t
106112
107113
9. Restart NGINX
108114

115+
On Ubuntu 14.04 and RHEL 6.6:
116+
109117
``sudo service nginx start``
118+
119+
On Ubuntu 16.04 and RHEL 7.1:
120+
121+
``sudo systemctl start nginx``
110122

111123
10. Check that your SSL certificate is set up correctly.
112124

source/install/install-rhel-66-nginx.rst

Lines changed: 0 additions & 44 deletions
This file was deleted.

source/install/install-rhel-66.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Install a production-ready Mattermost system on 1 to 3 machines.
1818
.. include:: install-rhel-66-mattermost.rst
1919
.. include:: config-mattermost-server.rst
2020
.. include:: config-tls-mattermost.rst
21-
.. include:: install-rhel-66-nginx.rst
21+
.. include:: install-rhel-nginx.rst
2222
.. include:: config-proxy-nginx.rst
2323
.. include:: config-ssl-http2-nginx.rst
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
.. _install-rhel-nginx:
2+
3+
Installing NGINX Server
4+
=======================
5+
6+
In a production setting, use a proxy server for greater security and performance of Mattermost.
7+
8+
The main benefits of using a proxy are as follows:
9+
10+
- SSL termination
11+
- HTTP to HTTPS redirect
12+
- Port mapping ``:80`` to ``:8065``
13+
- Standard request logs
14+
15+
**To install NGINX on RHEL 6.6 or 7.1:**
16+
17+
1. Log into the server that will host the proxy, and open a terminal window.
18+
19+
2. Create the file /etc/yum.repos.d/nginx.repo.
20+
``sudo touch /etc/yum.repos.d/nginx.repo``
21+
22+
3. Open the file as root in a text editor and add the following contents, where *{version}* is **6** for RHEL 6.6, and **7** for RHEL 7.1:
23+
24+
.. code-block:: none
25+
26+
[nginx]
27+
name=nginx repo
28+
baseurl=http://nginx.org/packages/rhel/{version}/$basearch/
29+
gpgcheck=0
30+
enabled=1
31+
32+
4. Install NGINX.
33+
34+
``sudo yum install nginx.x86_64``
35+
36+
5. After the installation is complete, start NGINX.
37+
On RHEL 6.6:
38+
39+
``sudo service nginx start``
40+
41+
On RHEL 7.1:
42+
43+
``sudo systemctl start nginx``
44+
45+
6. **Optional** Set NGINX to start at system boot.
46+
47+
On RHEL 6.6:
48+
49+
``sudo chkconfig nginx on``
50+
51+
On RHEL 7.1:
52+
53+
``sudo systemctl enable nginx``
54+
55+
4. Verify that NGINX is running.
56+
57+
``curl http://localhost``
58+
59+
If NGINX is running, you see the following output:
60+
61+
.. code-block:: html
62+
63+
<!DOCTYPE html>
64+
<html>
65+
<head>
66+
<title>Welcome to nginx!</title>
67+
.
68+
.
69+
.
70+
<p><em>Thank you for using nginx.</em></p>
71+
</body>
72+
</html>
73+
74+
75+
**What to do next**
76+
77+
1. Map a fully qualified domain name (FQDN) such as ``mattermost.example.com`` to point to the NGINX server.
78+
2. Configure NGINX to proxy connections from the Internet to the Mattermost Server.

0 commit comments

Comments
 (0)