By maulcux
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 128.199.81.1
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Take a look at your apache.conf (CentOS: httpd.conf), located in /etc/apache2/conf or /etc/httpd/conf. Almost at the end file you will find something about VirtualHost (NameVirtualHost to be precise). Perhaps this is still commented? If so, please uncomment en restart apache.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.