Score:0

nginx proxy_pass shows different app and crosses out https

cn flag

When I try to visit app2, this happens:

Why does this happen?

Here's the nginx configuration.

There are also A records for both subdomains.

events {}

http {

  include mime.types;

  proxy_connect_timeout   999;
  proxy_send_timeout      999;
  proxy_read_timeout      999;
  send_timeout            999;


  # APP 1 =============================================================

  server {
    listen 80;
    server_name app1.example.com;
    return 301 https://app1.example.com$request_uri;
  }

  server {
    listen 443 ssl;
    server_name app1.example.com;
    ssl_certificate /etc/letsencrypt/live/app1.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app1.example.com/privkey.pem;

    location / {
      proxy_pass 'http://localhost:3000/';
    }
  }

    # APP 2 ============================================================

    server {
        listen 80;
        server_name app2.example.com;
        return 301 https://app2.example.com$request_uri;
    }

    server {
        listen 443 ssl;
        server_name app2.example.com;
        ssl_certificate /etc/letsencrypt/live/app2.example.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/app2.example.com/privkey.pem;

        location / {
            proxy_pass 'http://127.0.0.1:8081';
        }
     }
}
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.