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?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×