I have created subdomains for my main site.
like
- cdn1.abc.com
- cdn2.abc.com
- cdn3.abc.com
and all point to / . but when I try to use cdn1.abc.com in a url it does not work. Perchance there is something else I need to do?
I have created subdomains for my main site.
like
and all point to / . but when I try to use cdn1.abc.com in a url it does not work. Perchance there is something else I need to do?
With your virtual host settings, you need to add a ServerAlias, sort of like this:
<VirtualHost *:80>
ServerName abc.com
ServerAlias cdn1.abc.com cdn2.abc.com cdn3.abc.com
You could also do "*.abc.com" on that line instead, if you wanted to allow all subdomains.
You need to setup Apache to serve your files for all of the subdomains.
There are two parts to this:
The first part will probably involve you using some online control-panel at your domain registrar. The second part will probably be as simple as adding:
...
ServerName abc.com
ServerAlias cdn1.abc.com cdn2.abc.com cdn3.abc.com
then restarting apache2.