SSL and Multisite redirecting to wrong SSL domain

(Dylan R. E. Moonfire) #1


I was trying to implement the directions from here. I added the follow sections into my app.yml file and did a sudo ./launcher rebuild app.

  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/sshd.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/web.ssl.template.yml"             # Let's Encrypt
  - "templates/web.letsencrypt.ssl.template.yml" # Let's Encrypt

    - replace:
        filename: "/etc/runit/1.d/letsencrypt"
        from: /no 4096/
        to: |
, 4096

    - replace:
        filename: "/etc/nginx/conf.d/discourse.conf"
        from: /rewrite \^ https.+/
        to: |
          return 301 https://$host$request_uri;

    - replace:
        filename: "/etc/nginx/conf.d/discourse.conf"
        from: /gzip on;[^\}]+\}/m
        to: |
          gzip on;

It worked great on going to the SSL site, but when I go to it redirects to instead of domain2 like I expected. What am I doing wrong?