0Answer
  • 13
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

SSL for Wiki.js on domain?

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...

      • 1
    • @MichaelHampton: After searching /var/log/apache2/error.log with Ctrl+W for "wiki", "8080", and "MongoDB", nothing shows up there. But I just reloaded the site while watching the network traffic and saw the error message "no-referrer-when-downgrade".
    • The MongoDB config should be the same in either http or https mode, since your end users are connecting via Apache / Wiki.js. I'm not familiar with Wiki,js, but expect its documentation would have more information on configuration.
      • 2
    • Are you sure nothing is logged after you receive a 502 error? Did you actually look at the end of the log, instead of just searching for keywords you thought might have been there?
    • Hi guys, thanks, but it doesn't matter anymore. I just stopped trying and installed Plesk, which makes all that stuff seamless. Set up MediaWiki with it, and no more problems.

Trending Tags