Apache installieren

  sudo apt install apache2

Konfiguration eines vhosts

/etc/apache2/sites-available/vhostname.conf

<VirtualHost *:80>
    ServerName www.example.com
    Redirect / https://www.example.com/
</VirtualHost>
 
<VirtualHost *:443>
    ServerName www.example.com
    # ... SSL configuration goes here
</VirtualHost>