: Pointing subdomain to my server My bro is using a service of a third party(say, X), with DNS addresses: ns1.x.com ns2.x.com So, bro bought a domain name, say abc.com. And pointed the DNS addresses
My bro is using a service of a third party(say, X), with DNS addresses:
ns1.x.com
ns2.x.com
So, bro bought a domain name, say abc.com. And pointed the DNS addresses with the above ones.
Now, bro wants to create a subdomain, say mysite.abc.com with custom content. But this service provider X, doesn't offer hosting of files that we give to them for the subdomain. Instead, they said they have created a subdomain and is pointing to my server(say, with an IP: 123.99.2.123)
So, how do I add a subdomain for mysite.abc.com in my server? BTW, I'm having a VPS server, with root access.
So far, I can see that adding a subdomain is possible only if the main domain is added. What changes do I have to make in my server so that, when accessing mysite.abc.com, files from my server would be delivered?
Sorry, I am not sure whether I confused you. Let me know if you need me to rephrase the issue or explain it with visual examples or something.
Thank you
More posts by @Shakeerah822
1 Comments
Sorted by latest first Latest Oldest Best
For a VPS with root access, follow this guide to add a subdomain:
library.linode.com/web-servers/apache/installation/ubuntu-12.04-precise-pangolin#sph_configure-name-based-virtual-hosts
Here's a quick example for you.
<virtualhost *:80>
ServerName mysite.abc.com
DocumentRoot /path/to/the/site/files/of/mysite.abc.com
ServerAdmin admin@mysite.abc.com
ErrorLog "/logs/mysite.abc.com.error.log"
CustomLog "/logs/mysite.abc.com.access.log" common
</VirtualHost>
Good luck!
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.