Redirect https to fqdn

by zero01alpha   Last Updated July 12, 2019 13:00 PM - source

First off, I don't want to use rewrites.

I'm trying to redirect any call (http or https) to myserver to the secured fully qualified domain using https at

Here is my config

# Redirect all http traffic to https
<VirtualHost *:80> # line 545
  Redirect /

<VirtualHost *:443> # line 549
  SSLEngine on
  SSLCertificateFile "conf/mycert.crt"
  SSLCertificateKeyFile "conf/mykey.key"
<VirtualHost *:443> # line 555
  ServerName myserver
  Redirect /

This works fine for http, I can call http://myserver and it redirects to just fine. However when I call https://myserver I get an error about the site not being secure, and it doesn't redirect to like I expect it to.

In Chrome, the error says

This server could not prove that it is myserver; its security certificate is from This may be caused by a misconfiguration or an attacker intercepting your connection.

This is the output of httpd -S

*:80          (C:/Apache24/conf/httpd.conf:545)
*:443                  is a NameVirtualHost
         default server (C:/Apache24/conf/httpd.conf:549)
         port 443 namevhost (C:/Apache24/conf/httpd.conf:549)
         port 443 namevhost myserver (C:/Apache24/conf/httpd.conf:555)
ServerRoot: "C:/Apache24"
Main DocumentRoot: "C:/Apache24/htdocs"
Main ErrorLog: "C:/Apache24/logs/error.log"
Mutex default: dir="C:/Apache24/logs/" mechanism=default
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "C:/Apache24/logs/"
Define: SRVROOT=c:/Apache24

How can I redirect https traffic to the FQDN?

Related Questions

Apache redirect from http to https not working

Updated May 10, 2017 12:00 PM

Single IP multiple domains SSL issue

Updated July 22, 2015 16:00 PM

Apache Virtual Host Not Matching ServerAlias

Updated May 24, 2017 13:00 PM

Apache virtualhost redirect to https

Updated August 11, 2017 10:00 AM