point a subdomain to a page without using domain module I want to add a subdomain to my site (mysite.local) so it is, x.mysite.local and I want that to land on a custom page, i.e. a node, a view. I do not want to use the domain module because it has way more stuff that I need. Is there an easy way to do that in a custom module?

I tried doing something like this in settings.php but that does not seem to work:

// Get the subdomain:
$sub = explode('.',  $_SERVER['HTTP_HOST'])[0];
if ($sub == 'test') {
  $config['system.site']['page']['front'] = "node/12664";
}
I'm going to assume 1) you already have the proper DNS records set up and 2) you want a redirect (tells the browser to go to URL node/12664) and not a proxy rewrite (i.e. serve the page at node/12664). 

Your best option would be to handle this in your .htaccess with mod_rewrite: 

# Handle request for subdomain 
RewriteCond %{HTTP_HOST} ^test\.mysite\.local$ [NC]
RewriteRule (.*) https://mysite.local/node/12664 [L,R]


If you do want to try to handle this as a redirect in your settings.php you could try something like this: 

if ($_SERVER["HTTP_HOST"] == 'test.mysite.local') {
    // Tell the browser to redirect to the HTTPS URL.
    header("Location: https://mysite.local/node/12664");
    exit;
}


If you want to serve a page from a different subdomain/host, without changing the URL, you'll have to delve into the hell of Apache ProxyPassReverse