Hi All!

I have this local debian server and I'm trying to add subdomains to it.

I only access it using its IP, but I edited the host file of my pc to access it using testwebsite.com and now I want to add subdomains. Each subdomain should be able to access different projects. For example the main domain (maindom.com) should be able to access /var/www/. Subdomain subone.com should be able to access /var/www/subone/, and subdomain subtwo.com should be able to access /var/www/subtwo/.

Is bind9 really needed?
Thanks in advance.

Re: subdomain in local debian server 80 80

BIND nor any other DNS server service isn't required if you simply want to resolve a few hostnames from a single PC. You can simply continue to add these hostnames to your PC's hosts file. All of these hostnames will map to the same IP address.

If the target server is a web server, how you route the request is dependent on the web server app, not on a DNS server service.

Re: subdomain in local debian server 80 80

I was trying to use VirtualHosts to access the subfolders for the subdomains. I tried the VirtualHosts in my local using apache and they worked. But when I tried the virtualhosts in the server, It won't work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.