How to configure a canonical hostname and force https with apache? -


i want use https , have 1 canonical domain. problem when make https connection secondary domain falls apart because certificate primary domain. there way solve or have buy certificate domains , not canonical domain?

relevant part of "/etc/apache2/apache2.conf"

# canonical hostname , use https <ifmodule mod_rewrite.c>   rewriteengine on    # force https on primary host (works fine)   # http://primary-host.com -> https://primary-host.com   rewritecond %{https} off   rewritecond %{http_host} ^primary-host\.com$   rewriterule (.*) https://primary-host.com%{request_uri}    # force https , redirect primary host (works fine)   # http://secondary-host.com -> https://primary-host.com   rewritecond %{https} off   rewritecond %{http_host} ^secondary-host\.com$   rewriterule (.*) https://primary-host.com%{request_uri}    # fail: certificate doesn't match , "bad request (400)" if accepted!   # https://secondary-host.com -> https://primary-host.com   rewritecond %{https} on   rewritecond %{http_host} ^secondary-host\.com$   rewriterule (.*) https://primary-host.com%{request_uri}  </ifmodule> 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -