That's very nice. And yes, precisely KeyHelp's own config is what I was after. Specifically:
Code: Select all
# Subdomain catch-all
IncludeOptional keyhelp/subdomain_catch_all.conf
# Default page, if domain not available.
<VirtualHost *:##webserver.https_port##>
ServerName ##server.domain##
ServerAlias *.##server.domain##
SSLEngine On
SSLCertificateFile /etc/ssl/keyhelp/keyhelp.pem
SSLCertificateChainFile /etc/ssl/keyhelp/keyhelp-ca.crt
Redirect / https://##server.domain##/index.php?page=notavailable
</VirtualHost>
# Default page | Redirect HTTP -> HTTPS
<VirtualHost *:##webserver.http_port##>
ServerName ##server.domain##
ServerAlias *.##server.domain##
Redirect / https://##server.domain##/index.php?page=notavailable
</VirtualHost>
I don't want the visitor to end up on a "domain not available" page. If the domain resolved to the server's IP it must be either in progress of being added or by design.
Also the certificate stuff is hardcoded, and I couldn't find another way to implement my wildcard cert with redirection to HTTPs. Essentially what I'm doing is allowing users (which I treat as sites because it's just me on the VPS) to have their own subdomain already covered by the wildcard certificate. Another scenario is to use user.domain.name as a development copy of the live site.
If I can't set immutable flags on templates then my only other option would be to manually check for updates and run replacements again. I'd rather do that in templates but I have a feeling the ioncube obfuscated code will have already generated the actual config files by that time. Is there a way to manually trigger re-generation of config files from templates?
That's awesome that nginx and apache vhost templating are coming. I won't hold you to it, but will eagerly await.
Thank you!