These instructions are for Apache2 and MindTouch 1.90 until someone else adds different proxy instructions.
Setting up a reverse proxy is simple for MindTouch. The following is done on your reverse proxy server:
A new virtual host within Apache must be created. A sample virtual host section is copied below.
<VirtualHost *:80>
ServerName wiki.domain.com:80
ErrorLog /var/log/apache2/error.log
LogLevel warn
TransferLog /var/log/apache2/access.log
ProxyPass / http://internalservername/
ProxyPassReverse / http://internalservername/
ProxyVia Off
ProxyRequests Off
ProxyPreserveHost On
<proxy>
Order deny,allow
allow from all
</proxy>
</VirtualHost>
This configuration has been tested and is working. No rewrite rules are necessary.
Using the instructions for Enable SSL at Login Time Only with a reverse proxy in front of MindTouch. However, do not make the changes shown on that page to MindTouch. Rather you will make them on the proxy server.
There may be a more efficient way of doing this, however this configuration of the Apache reverse proxy does work.
#### Wiki Configuration #####
<VirtualHost *:80>
ServerName wiki.domain.com:80
CustomLog "|/usr/sbin/rotatelogs /var/log/apache2/wiki/access.log 86400" common
ReWriteEngine On
##### Redirect login page to https ######
RewriteCond %{QUERY_STRING} ^title\=Special\:Userlogin.*
RewriteRule (.*) https://wiki.domain.com$1 [L,R,NE]
ProxyRequests Off
ProxyPass / http://wiki.domain.com/
ProxyPassReverse / http://wiki.domain.com/
ProxyVia Off
ProxyRequests Off
ProxyPreserveHost On
<proxy>
Order deny,allow
allow from all
</proxy>
</VirtualHost>
<VirtualHost *:443>
Servername wiki.domain.com:443
CustomLog "|/usr/sbin/rotatelogs /var/log/apache2/wiki/access.log 86400" common
SSLengine On
SSLcertificatefile /etc/apache2/wikicert.pem
ReWriteEngine On
# When we are going from the login page back to the home page,
# redirect back to the non-SSL site. Disable this rewrite rule when
# you want all traffic to go to the SSL site.
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{HTTP_REFERER} ^https.*title\=Special\:Userlogin\&returnto$
RewriteRule (.*) http://wiki.domain.com$1 [L,R,NE]
ProxyPass / http://wiki.domain.com/
ProxyPassReverse / http://wiki.domain.com/
ProxyVia Off
ProxyRequests Off
ProxyPreserveHost On
<proxy>
Order deny,allow
allow from all
</proxy>
</VirtualHost>
Again, no changes need to be made to the Apache config on MindTouch.
The wikicert.pem is a 3rd party certificate I purchased for my domain.
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |