Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to setup subdomain on multiple virtual host vps?
I’m on an ubuntu server and using apache.
I’ve set several domains on my droplet but when I tried to access www.seconddomain.com it is redirected to firstdomain.com, as so the other nextdomain.com.
without any CNAME I can access the other sites normally. But then I want to create an A record type subdomain, test.firstdomain.com to access root directory
/var/www/test. And its the same problem again, it shows the page of firstdomain.com.
My setting is,
www.firstdomain.com. 1800 IN CNAME firstdomain.com. *.codemastery.net. 1800 IN CNAME codemastery.net. test.firstdomain.com. 1800 IN A 18.104.22.168
for the conf file I am creating new file on sites-available test.firstdomain.com.conf then add it with a2ensite..
Any help is appreciated, thanks
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.×