Pure vhost aliases / additional aliases without zone file

websafe

Verified User
Joined
Jun 15, 2010
Messages
103
Location
Opole, PL
Hello,

It would be great to have a possibility to add ServerAlias'es to vhosts without a zone file. Scenario - OVH CDN. OVH CDN requires, that we create a subdomain with a CNAME record:
https://docs.ovh.com/gb/en/cdn-infrastructure/first-domain-configuration-on-cdn/

It is important to use the CNAME record for this, as it makes the Bypass function work correctly. If you use an A record instead, the CDN will work, but the bypass function will not.

otherwise the bypass function won't work, as mentioned.


So I tired the following:

1) I've added to the domain.com zone a CNAME record, but Apache was serving only the shared ip page for cdn.domain.com, which is of course understandable. CDN was not working.

2) I've added a domain alias, but this will be against the OVH CDN rules, which require me to use a CNAME

3) A pointer (without alias) was not working too, because there's a redirect and the CDN went crazy.


So I ended up creating a static vhost configuration and included it in /etc/httpd/conf/httpd.conf right before

Code:
# All the DirectAdmin vhosts
Include conf/extra/directadmin-vhosts.conf

but I don't like this solution.

But I wonder - what should I do when multiple users will start using CDN's like this. Any solution for this scenario?


Maybe some kind of "Alias" without a zone file?
 
Thank you, Alex.

Now I see, I'm able to add aliases via CUSTOM HTTPD, by setting:

|?SERVER_ALIASES=cdn-a.mydomain.com cdn-b.mydomain.com cdn-c.mydomain.com|

but this will remove from the ServerAlias line all (full) aliases I've added via Advanced features -> Domain Pointers.
 
Back
Top