<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>On 2017-05-29 2:28 PM, Christopher Cox wrote:<br>
</p>
<blockquote type="cite"
cite="mid:e00fd1a2-b585-ba98-fccd-b42a754158b4@endlessnow.com">
<blockquote type="cite" style="color: #000000;">My installations
contains a standard PmWiki (with some cookbooks...), Apache
<br>
running on a FreeBSD-server that I have total control over.
<br>
</blockquote>
<br>
For apache I use in my .htaccess (this should be generic enough),
before your other rules:
<br>
<br>
RewriteEngine On
<br>
RewriteCond %{HTTPS} off
<br>
RewriteRule ^(.*)$ <a class="moz-txt-link-freetext"
href="https://%" moz-do-not-send="true">https://%</a>{HTTP_HOST}%{REQUEST_URI}
[L,R=301]
<br>
</blockquote>
<br>
An even simpler (and I suspect more efficient) way is as follows in
httpd.conf (assuming you have full server control):<br>
<br>
<blockquote type="cite"><VirtualHost *:443><br>
ServerName mugoo.com<br>
ServerAlias *.mugoo.com *.mugoo.ca<br>
<br>
<If "%{HTTP_HOST} != 'mugoo.com'"><br>
Redirect / <a class="moz-txt-link-freetext" href="https://mugoo.com/">https://mugoo.com/</a><br>
</If><br>
<br>
DocumentRoot xxxx/MUGOO<br>
SSLEngine on<br>
SSLCertificateFile "xxxx.crt"<br>
SSLCertificateKeyFile "xxxx.key"<br>
</VirtualHost><br>
<br>
####-----------------vhosts that were moved to secure
folders------------------####<br>
####<br>
<br>
<VirtualHost *:80><br>
ServerName mugoo.com<br>
ServerAlias mugoo.ca *.mugoo.ca *.mugoo.com<br>
Redirect permanent / <a class="moz-txt-link-freetext" href="https://mugoo.com/">https://mugoo.com/</a><br>
</VirtualHost><br>
</blockquote>
<br>
I have 5 wikis in a farm that I moved to https using similar conf
lines as above. I dislike using ReWrite because it has so many
options I am always afraid of putting in something insecure. The
redirect permanents are dead simple and don't require any changes to
the original sites as long as they use all relative links. I had to
patch a few fully qualified links.<br>
<br>
As far as I can recall I did not have to make any code changes
toPmWiki sites, but getting SMF and WordPress to work under SSL is
more difficult. <br>
<br>
If anybody sees any holes in this setup, please let me know! ;-)<br>
<br>
Neil<br>
<pre class="moz-signature" cols="72">--
Neil Herber</pre>
</body>
</html>