I’ve setup DNS in DigitalOcean control panel for new subdomain and also configured httpd. I followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-6
But after restarting apache, my main site is pointing to subdomain’s directory.
Please help.

Thanks,
Neo.

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.

×
2 answers

Please give me your main website directory and your sub-domain directory.
Also post your Apache Virtual Host.

Thanks for your answer. I was able to sort out the problem.

  • May I ask how it was sorted? I am having trouble with a TLD that comes with a TLS/SSL cert. and finding a way to install a lets encrypt on the subdomain. The cert on the primary domain is a single domain with no wildcard. I just need to make sure the subdomain is being setup right and what the public_html folder’s .htaccess and subdomain’s .htaccess should be. Any help is much appreciated.

Submit an Answer