<div id="geary-body" dir="auto"><div><div><div>Something like this should work:</div><div><br></div><div>  (* Serve the website over https *)</div><div>  vhostDefault where</div><div>    DocumentRoot = home "vhosts/smichel.me/htdocs";</div><div>    SSL = use_cert "/etc/apache2/ssl/user/smichel.me.pem";</div><div>  with end;</div></div><div><br></div><div><div>  (* Redirect http to https *)</div><div>  vhostDefault with</div><div>    rewriteRule "^(.*)$" "<a href="http://smichel.me$1/">http://smichel.me$1</a>" [redirectWith temp]</div><div>  end;</div></div><div><br></div><div>  (* Redirect www traffic to plain domain (http) *)</div><div>  web "www" with</div><div>    rewriteRule "^(.*)$" "<a href="https://smichel.me$1/">https://smichel.me$1</a>" [redirectWith temp]</div><div>  end;</div><div><br></div><div>  (* Redirect www traffic to plain domain (https) *)</div><div>  web "www" where</div><div>    SSL = use_cert "/etc/apache2/ssl/user/smichel.me.pem";</div><div>  with</div><div>    rewriteRule "^(.*)$" "<a href="https://smichel.me$1/">https://smichel.me$1</a>" [redirectWith temp]</div><div>  end;</div></div></div><div id="geary-signature" dir="auto">--<br>I try to write short, functional emails.</div><div id="geary-quote" dir="auto"><br>On Sun, Mar 8, 2020 at 14:55, Kenneth Pronovici <pronovic@hcoop.net> wrote:<br><blockquote type="cite"><div dir="ltr">I'm working to enable HTTPS for all of my sites hosted at HCOOP.  I started with <a href="http://brilliantwatersyoga.com">brilliantwatersyoga.com</a>, because it's fairly simple.  <br><div><br></div><div>Today, I have things configured so that <a href="http://www.brilliantwatersyoga.com/">http://www.brilliantwatersyoga.com/</a><anything> redirects to <a href="http://brilliantwatersyoga.com/">http://brilliantwatersyoga.com/</a><anything>, so my setup handles the www. but always just strips it.<br></div><div><br></div><div>When enabling SSL, I want to do something similar.  I want all 3 of <a href="http://brilliantwatersyoga.com">http://brilliantwatersyoga.com</a>, <a href="http://www.brilliantwatersyoga.com">http://www.brilliantwatersyoga.com</a>, and <a href="https://www.brilliantwatersyoga.com">https://www.brilliantwatersyoga.com</a> to redirect to <a href="https://brilliantwatersyoga.com">https://brilliantwatersyoga.com</a> - so no matter where someone goes, they get redirected to the canonical https URL.  </div><div><br></div><div>Can someone suggest the right way to do this?  

I know how to do this with raw Apache configuration, but I can't find the right way to do it in domtool.  

I've worked through all of the various examples in the wiki, but I can't find a combination such that all of the http and https URLs work as expected.   A lot of the time, I end up with working https URLs but "Unconfigured Member Virtual Host" for the http URLs.   My existing non-HTTPS domtool configuration is below.  </div><div><br></div><div>Thanks,</div><div><br></div><div>KEN</div><div><br></div><div>----</div><div><br></div><div>dom "<a href="http://brilliantwatersyoga.com">brilliantwatersyoga.com</a>" where<br>   DefaultAlias = false;<br>   CreateWWW = false;<br>   DefaultWebNode = "shelob";<br>with<br>   dnsDefaultText "v=spf1 mx a:<a href="http://muffat.debian.org">muffat.debian.org</a> a:<a href="http://mailly.debian.org">mailly.debian.org</a> -all";<br><br>   vhostDefault where<br>      WebPlaces = [web_place_default "shelob"];<br>      DocumentRoot = home "web/htdocs/<a href="http://brilliantwatersyoga.com">brilliantwatersyoga.com</a>";<br>   with<br>      alias "/.well-known" ( home "web/data/<a href="http://brilliantwatersyoga.com/.well-known">brilliantwatersyoga.com/.well-known</a>" );<br>   end;<br><br>   web "www" with<br>      rewriteRule "^(.*)$" "<a href="http://brilliantwatersyoga.com">http://brilliantwatersyoga.com</a>$1" [redirectWith permanent]<br>   end;<br><br>   dnsIP "mail" deleuze_ip;<br><br>   emailAlias "kenneth.pronovici" "pronovic";<br>   emailAlias "admin" "pronovic";<br>   emailAlias "webmaster" "pronovic";<br>   emailAlias "contact" "pronovic";<br>   emailAlias "support" "pronovic";<br>end;<br></div></div>
</blockquote></div>