Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

It is not possible to direct HTTPS to HTTP as that is redirecting secure traffic to less secure method, but the other way around is ok!

https://askubuntu.com/questions/653923/force-https-and-www-with-virtual-host-apache2/653925#653925

<VirtualHost *:80>
    ServerName freesoftwareservers.com
    ServerAlias *.freesoftwareservers.com
    Redirect / https://www.freesoftwareservers.com/
</VirtualHost>

<VirtualHost *:443>
  ServerName freesoftwareservers.com
  Redirect / https://www.freesoftwareservers.com/
</VirtualHost >

<VirtualHost *:443>
  ServerName www.freesoftwareservers.com

###

</VirtualHost >

This all goes inside one virtual host file (sites-available)

  • No labels