Sub server shows main domain's page

4 posts / 0 new
Last post
#1 Wed, 10/16/2019 - 01:33
bestnetcraft

Sub server shows main domain's page

I have been trying to sort this issue for over a week. I would be grateful if any one can help me on this.

I have a dedicated server running Centos 6.10 with Webmin/Virtualmin. I have a few sub servers under a main domain. Every sub server continues to show the main site. I have edited the httpd.conf to reflect the document root like this: /home/main-domain/public_html/subdomain I hunted down some directive here: /etc/webmin/virtual-server/domains/xxxxxxxxx and changed the document root as needed. Still no joy.

Where does the Virtualmin store the document root other than the ones pointed above ? I moved the sites from a cpanel full backup. I struggled a lot to make the main site work after modifying the apache directives.

Wed, 10/16/2019 - 08:15
Dibs

What version of Virtualmin are you one? If it's 6.05 or later you may need to check your VirtualHosts blocks in Apache's config for the *:80 fields, especially if you've created the sub-domains recently.

Wed, 10/16/2019 - 23:26 (Reply to #2)
bestnetcraft

Thank you for your message. My Virtualmin is 6.07. I have identical directives under *:80 and *:443 Problem is apache directives are added by Virtualmin somewhere else and I can't find it. The httpd.conf is the place we normally would look for.

Thu, 10/17/2019 - 00:04 (Reply to #3)
Dibs

Use

apachectl -S; apachectl -M

to list out your entire Apache config and post it up. Sanitise\anonymise it by all means but try and keep it so that someone can read it\follow it please. By that I mean don't replace all IP's with 1.1.1.1 and don't replace all VHOSTS with mydomain.com - use mydomain1.com, mydomain2.com, etc.

Topic locked