Welcome! Log In Create A New Profile

Advanced

Wordpress Multisite Woes - delivering wrong site and more

Posted by chrisco23 
Wordpress Multisite Woes - delivering wrong site and more
August 27, 2020 01:30PM
Yesterday I tried to convert one my Wordpress sites on my VPS to Multisite and I've hit a couple snags.

1. From the Network Administrator Dashboard in WP, I can see my original site and a second site I added. The original site is fine. I am attempting to add this second site as a subdomain (no real reason subdomain vs. folders). When I try to go to the second site, it takes me to a completely unrelated Wordpress site I also run. Even scarier, if I go to the admin of the second site, it takes me to the >admin< of this unrelated site. Fortunately right now I'm the only one with access to the VPS and the only one with access to any of the Wordpress admin areas.

From another browser not logged into anything, at least both sites currently give a 404. This is better than going to the wrong site for the moment.

I've been using nginx from the beginning but I'm no nginx master. But I have encountered this situation of nginx defaulting to the first alphanumeric site, and that's the one I'm getting here, a site whose domain begins with the number "2".

I haven't been using a default server for some years but I thought that would help. I see no change. I looked at various versions on the net and this is what I have now:

[code]
$ cat 00-default.conf
server {
server_name _;
listen 80 default_server;
return 404;
}


server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
return 404;
}
[/code]

I assume this is getting hit for the case where I'm on a different browser and not logged in to any Wordpress site.

Now I am trying to have my Multisite install have a second site, call it new.mydomain.com. In my registrar, I have added a wildcard "*" for the domain. Using certbot I have (hopefully correctly but not sure at this point) added the wildcard domain to my original domain certificate.

I the nginx config of my original site of this multisite (work in progress), I have tried every combination of "server_name mydomain.com", "server_name mydomain.com *.mydomain.com", "server_name new.mydomain.com", etc., but nothing seems to catch browser attempts to reach new.mydomain.com.

Any advice on how to debug this would be very highly appreciated.

Thanks,
Chris
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready