Apache VirtualHost

The Apache HTTP Server uses the VirtuaHost Directive to point incoming HTTP call to the relevant files and system resources on the server.

Essentially you want to look for files such as the following: - Apache 000-default.conf - Apache 000-default-le-ssl.conf

which you will find in the following folder:

etc/apache2/sites-enabled

# One config file per host

If you want it to be a bit structured you CAN use the Apache2 built in VHosts System in:

/etc/apache/sites-availible/

with multiple files for every site (VHost).

Then activate or deactivate it via the a2ensite command. Like:

a2ensite mypage1

# Configure on DigitalOceon

# Redirecting to HTTPS

To redirect http URLs to https, do the following:

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