Question: I have a problem whereby my VirtualHost is overriding another VirtualHost on the same domain.

httpd.conf

```
IncludeOptional conf.d/*.conf

```

example.conf

```
<VirtualHost *:80>
        DocumentRoot /var/www/html/example/
        ServerName www.example.com
        ServerAlias www.example.com
    Redirect permanent / https://www.example.com/
</VirtualHost>
<VirtualHost *:443>
    DocumentRoot /var/www/html/example/
    SSLEngine on
    SSLCertificateFile /etc/httpd/ssl/example/example.crt
    SSLCertificateKeyFile /etc/httpd/ssl/example/example.key
    SSLCertificateChainFile /etc/httpd/ssl/example/chain.cer
    ServerName www.example.com
    ServerAlias www.example.com
</VirtualHost>

```

get.example.conf

```
<VirtualHost *:80>
        DocumentRoot /var/www/html/get.example/
        ServerName get.example.com
        ServerAlias get.example.com
</VirtualHost>

```

When I created `get.example.conf` and when I accessed `example.com`, it is showing the content of `get.example.com`

Does anyone knows what is going wrong with my configuration?

Answer: 
You just have to set up de ServerAlias.
In your example, it should be enough to do as follow:

```
<VirtualHost *:80>
        DocumentRoot /var/www/html/example/
        ServerName example.com
        ServerAlias www.example.com
    Redirect permanent / https://www.example.com/
</VirtualHost>

```

Note that **ServerName** doesn't has *www.*, so that it's gonna match **<http://example.com>**, while with the **ServerAlias** it's gonna match **<http://www.example.com>**
Try to change the order of `ServerName` and `ServerAlias` to your get.example.conf:

```
<VirtualHost *:80>
        ServerName get.example.com
        ServerAlias get.example.com
        DocumentRoot /var/www/html/get.example/
</VirtualHost>

```