Page 1 of 1

New subdomain and its directory

Posted: Mon Aug 20, 2018 10:55 pm
by konradmm
Basically title is pretty simple, yet my problem is kinda bigger.

First of all, few words about my current setup.
I got domain on OVH, lets say EXAMPLE.com. I use personalized DNS Servers pointing as follows:
ns1.EXAMPLE.COM and ns2.EXAMPLE.COM to IP Address of my VPS.

on my VPS there is bind9 server with kinda properly configured dns server (i believe so).

Created a domain with DNS Support: EXAMPLE.COM and it auto-created a directory: "/home/admin/web/EXAMPLE.COM/public_html/".
Whenever i go into my domain address - EXAMPLE.COM, i see properly contents of /public_html/
Now the trickier part.

Im creating the subdomain, lets say: TEST.EXAMPLE.COM, and similar from the example above, it creates the directory "/home/admin/web/TEST.EXAMPLE.COM/public_html/".
However 2 things that bothers me here:

1. When i use "http://test.example.com" in web browser, it returns me an error: "This webpage is unavailable. Ip couldnt be find, blah blah check ur dns servers etc."
2. When i use "http://www.test.example.com" in web browser, it actually shows me the site, however it shows the site from directory: "/home/admin/web/EXAMPLE.COM/public_html/".

It created the subdomain folder in /home/admin/web/, however its not using this directory, but the one for domain EXAMPLE.COM.

So basically 2 questions. What do i need to change to make my subdomains work WITHOUT "WWW" + Why it shows site from main domain, instead of subdomain.

Thanks in advance. Kinda bothering a lot with it.
(Still a bit newbie in all that dns'y stuff, yet in 2nd post will provide screenshots of my current configuration)

Re: New subdomain and its directory

Posted: Mon Aug 20, 2018 11:00 pm
by konradmm
Image

Aint sure if there is anything else needed for configuration, so if anything comes to ur mind, ill provide more data.

Re: New subdomain and its directory

Posted: Tue Aug 21, 2018 9:57 am
by konradmm
I wish i said "found solution", but apparently, it just started working. Was trying a bit more with DNS Records, adding weird stuff like "@ A 123.123.123.123", removed website, added again, and it works. No idea what fixed my issue, but prefer not risking bricking it again.

Re: New subdomain and its directory

Posted: Tue Aug 21, 2018 5:49 pm
by konradmm
Aaaand it stopped working again. I gont get it at all xD