subdomain opens another domain in same server

3 posts / 0 new
Last post
#1 Thu, 02/14/2019 - 06:34
sanilshakya

subdomain opens another domain in same server

I have multi site wordpress intallation. Main site is example.com, and another is eng.example.com When I try to open eng.example.com, it shows files of another domain/virtual-host in same server. (url stays same i.e "eng.example.com" but opens files of another virtualhost). If I delete second virtual-host/domain then eng.example.com shows correct files. I have tried both "A" record and "CNAME" for subdomain, but none of this has solved. What should I do? Any suggestion.

Sun, 02/17/2019 - 05:30
thathwamasi

Hello sanilshakya,

1) When I try to open eng.example.com, it shows files of another domain/virtual-host in same server. IS your second domain the deaulf website for IP.

2) I have multi site wordpress intallation. Main site is example.com, and another is eng.example.com W HAve you created eng.example.com as subserver i.e alias of example.com in virtualmin ?

Sun, 03/31/2019 - 11:28
Gregory.K

I have not all the necessary information on your setup, but just in case
check your vhost conf (/etct/apache2/sites-available) files if all <VirtualHost x.x.x.x:80> or <VirtualHost x.x.x.x:443> entries are the same (in all files)

x.x.x.x as in server-IP or * (all IPs)

if for example all vhosts are <VirtualHost x.x.x.x:80>
except from one with <VirtualHost *:80>,
the later is preferred by Apache

you can find more info on that matter by searching the forums and issues

just a quick search
https://www.virtualmin.com/node/51766

Topic locked