# WP SSO + Discourse Multisite

**URL:** https://meta.discourse.org/t/wp-sso-discourse-multisite/191538
**Category:** Support
**Created:** [May 25, 2021, 5:22am UTC](https://meta.discourse.org/t/wp-sso-discourse-multisite/191538 "2021-05-25T05:22:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Tim\_Jefferies](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tim_jefferies/32/113296_2.png) [@Tim\_Jefferies](https://meta.discourse.org/u/Tim_Jefferies)
#### Post date: [May 25, 2021, 5:22am UTC](https://meta.discourse.org/t/wp-sso-discourse-multisite/191538/1 "2021-05-25T05:22:43Z")

</div>

I have 2 separate instances of discourse, and I wanted to roll them into a single multisite instance.

I followed the multisite guide to set up a new db and the build went fine. The problem is that when I navigate to the domain on instance b, it redirects to instance a (the original one that is tied to WordPress SSO). This means that:

1. going to [https://instanceb.discourse](https://instanceb.discourse)
2. instead redirectsto [https://instancea.discourse](https://instancea.discourse)
3. which then redirects to the wordpress login page.

How do I get the new multisite container to show up?

I don’t mind if the second container needs SSO as well - it wasn’t set up before.

Because I can’t get instanceb to load, I can’t configure it or import the config.

I’m using a reverse nginx proxy to access both instances.

Any help appreciated.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [May 27, 2021, 8:25am UTC](https://meta.discourse.org/t/wp-sso-discourse-multisite/191538/2 "2021-05-27T08:25:23Z")

</div>

Hey Tim,

This one is more of a Discourse multisite question, as your issue seems to be the relationship between your two Discourse multisite instances and potentially the routing you have setup between the two of them. Wordpress SSO is not your issue here, so I’ve re-categorised your topic to #Support.

I would note the following warning on Discourse’s multisite #howto

> While multisite is supported in the Discourse application, this is an advanced sysadmin setup. **If you don’t know what you’re doing, do not set up multisite**. The Discourse team is unable to provide multisite configuration support.

As our focus is more on the Wordpress plugin per se in #Support > WordPress, and I’m no discourse multisite expert myself, your best bet might be to see if someone in the community can point you in the right direction, or for you to hire someone to help you out in the #Marketplace.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 27, 2021, 10:56am UTC](https://meta.discourse.org/t/wp-sso-discourse-multisite/191538/3 "2021-05-27T10:56:35Z")

</div>

> [@Tim\_Jefferies](#):
>
> The problem is that when I navigate to the domain on instance b, it redirects to instance a (

That sounds like a multisite issue. Which guide did you follow?

---

<div class="post-metadata">

### Author: ![Tim\_Jefferies](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tim_jefferies/32/113296_2.png) [@Tim\_Jefferies](https://meta.discourse.org/u/Tim_Jefferies)
#### Post date: [June 1, 2021, 3:31am UTC](https://meta.discourse.org/t/wp-sso-discourse-multisite/191538/4 "2021-06-01T03:31:53Z")

</div>

I followed this guide:

> [@Multisite configuration with Docker](https://meta.discourse.org/t/multisite-configuration-with-docker/14084):
>
> warning While multisite is supported in the Discourse application, this is an advanced sysadmin setup. If you don’t know what you’re doing, do not set up multisite. The Discourse team is unable to provide multisite configuration support. If you wish to host multiple domains on a singled Docker setup, you’ll need a multisite configuration. Here are the basic building blocks for one. Understand hooks Multisite is a fairly advanced topic. Before attempting a multisite build, spend some time…

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 1, 2021, 8:20am UTC](https://meta.discourse.org/t/wp-sso-discourse-multisite/191538/5 "2021-06-01T08:20:09Z")

</div>

My best guess is that you have your reverse proxy misconfigured and it’s redirecting site 2 to site 1 , or perhaps it did once and your browser cached the 301 redirect.

---

<div class="post-metadata">

### Author: ![Tim\_Jefferies](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tim_jefferies/32/113296_2.png) [@Tim\_Jefferies](https://meta.discourse.org/u/Tim_Jefferies)
#### Post date: [June 2, 2021, 3:36am UTC](https://meta.discourse.org/t/wp-sso-discourse-multisite/191538/6 "2021-06-02T03:36:02Z")

</div>

I’m using the standard nginx proxy config. The only change I made is that I added instanceb in the server\_name so that traffic would be routed to the container. Is there a different way of doing this with discourse multisite?

```plaintext
server {
    listen 443 ssl http2; listen [::]:443 ssl http2;
    server_name instancea.mydomain.com instanceb.mydomain.com

    ssl on;

        ssl_certificate /var/www/vhosts/mydomain.com.csr;
        ssl_certificate_key /var/www/vhosts/mydomain.com.key;

    ssl_session_tickets off;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;

    http2_idle_timeout 5m; # up from 3m default

    location / {
        proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;

  proxy_connect_timeout 600;
  proxy_send_timeout 600;
  proxy_read_timeout 600;
  send_timeout 600;
    }
}

```
