Hi there, can anyone explain to me exactly what I need to do to set up sub domains / wildcard sub domains? ie. What I need to do to the DNS and Apache?
Thanks in advance, Francis PS. On an ubuntu vps
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Im thinking you just setup DNS and then you just need to tell apache the different sites with virtualhosts
If you’re not using a control panel, then you’d simply create an A entry using * as the entry instead of a name and then setup .yourdomain.ext in your Apache vhost configuration. <br> <br>So for your vhost, something such as the following should get you going. <br> <br><VirtualHost 99.99.99.99> <br>DocumentRoot /path/to/home/folder <br>… <br>ServerAlias .yourdomain.ext <br>ServerName www.yourdomain.ext <br>CustomLog domlogs/yourdomain.ext combined <br>… <br></VirtualHost> <br> <br> <br>The ServerName & ServerAlias are what you want to pay attention to. The … are just in there for separation and should not be added to your vhost configuration. <br> <br>For your WildCard DNS entry, it should look something like: <br> <br> <br>.yourdomain.ext. 14400 IN A 99.99.99.99 <br> <br>- OR - <br> <br> 14400 IN A 99.99.99.99 <br> <br> <br>It depends on how your registrar allows you to enter DNS records.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.