I'm failing and would like some help.
I've installed Wiki.js at wiki.mydomain.com, and I've been able to access it via HTTP on the port I designated to it, port 8080. But when I started trying to enable SSL, I kept breaking it. And so when I try to reverse proxy that SSL to 8080, I get "502 proxy error".
- Already installed the certificate via certbot to wiki.mydomain.com
I'd appreciate any and all input, even if it's regarding some other aspect of the configuration.
WIKI.MYDOMAIN.COM.CONF
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://1.2.3.4:8080/
ProxyPassReverse / http://1.2.3.4:8080/
ServerName wiki.mydomain.com
DocumentRoot /var/www/wiki.mydomain.com/
RewriteEngine on
RewriteCond %{SERVER_NAME} =wiki.mydomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
WIKI.MYDOMAIN.COM-LE-SSL.CONF
#Listen 443
#NameVirtualHost *:443
<IfModule mod_ssl.c>
<VirtualHost *:443>
ProxyPass / http://1.2.3.4:8080/ retry=1 acquire=3000 Keepalive=On
ProxyPassReverse / http://1.2.3.4:8080/
ServerName wiki.mydomain.com
DocumentRoot /var/www/wiki.mydomain.com/
#MANUALEDITING
#Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
#/MANUALEDITING
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/wiki.mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/wiki.mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
/VAR/WWW/WIKI.MYDOMAIN.COM/CONFIG.YML
...
host: 'https://wiki.mydomain.com'
port: 8080
...
/ETC/MONGODB.CONF
...
bind_ip = 127.0.0.1,1.2.3.4
port = 27017
...
# SSL options
# Enable SSL on normal ports
#sslOnNormalPorts = true
# SSL Key file and password
#sslPEMKeyFile = /etc/letsencrypt/live/wiki.mydomain.com/fullchain.pem
#sslPEMKeyPassword = /etc/letsencrypt/live/wiki.mydomain.com/keyfile.pem
(Whenever I've tried to uncomment / enable that SSL section there, it causes mongodb.service to fail to load.)
DNS
wiki.mydomain.com TXT = "replicaSet=mySet&authSource=authDB" @ 86400
_mongodb._tcp.server.my.domain.com SRV = "wiki.mydomain.com" @ 86400 on port 8080
Pretty sure I'm not matching something up properly here...