How to use only subdomain in nginx
I just purchased new domain name with DigitalOcean droplet
Let’s say my domain is abc.com,
i only want to access my website from test.abc.com
not from root, not from others.
Currently in DO, i set my DNS records like this:
A record - test.abc.com - myIP
AAAA record (for ipv6) - test.abc.com - ipv6address
- How should my nginx file looks like to use only that subdomain?
- Should i set DNS records for the root too? abc.com?