"I'm trying to SSL "mattermost" but after doing "certbot --apache" I set up the config file but when I access https I get a "503 Service Unavailable".
My domain is:my_domain
I ran this command:
It produced this output:
"certbot --apache" ended successfully.
Then, the following settings were made.
- /opt/mattermost/config/config.json
"ServiceSettings": {
...
"SiteURL": "https://my_domain/",
"ListenAddress": ":443",
"TLSCertFile": "/etc/letsencrypt/live/my_domain/fullchain.pem",
"TLSKeyFile": "/etc/letsencrypt/live/my_domain/privkey.pem",
...
},
- /etc/httpd/conf/httpd-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot /var/www/html
ServerName my_domain
ProxyPreserveHost On
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
RewriteEngine On
RewriteCond %{REQUEST_URI} /api/v[0-9]+/(users/)?websocket [NC]
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 my_domain
</Location>
SSLCertificateFile /etc/letsencrypt/live/my_domain/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my_domain/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
- /etc/httpd/httpd.conf (The end result was the same whether this setup was done or not.)
<VirtualHost *:443>
ServerName my_domain
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/my_domain/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my_domain/privkey.pem
ProxyPass / http://localhost:8065/
ProxyPassReverse / http://localhost:8065/
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</VirtualHost>
- systemctl restart httpd
My web server is (include version):Apache/2.4.37
The operating system my web server runs on is (include version):Oracle Linux 8
My hosting provider, if applicable, is:Oracle Cloud
I can login to a root shell on my machine (yes or no, or I don't know):Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):2.6.0