Score:0

nginx reverse poxy to a service on another wireguard peer

ms flag

Before asking this question, I already self-searched but no solutions.

I have lots of services on my home server, and I bind it with a VPS by Wireguard (confirmed they can find each other). I hope to use nginx on VPS to reverse proxy to these services by proxy_pass http://10.0.0.2:xxxx

Now my case is, the service is can be find but only a pure empty page. The browser console show 404 error for all css and js file.

The related config is here:

server {
        listen       443 ssl http2;
        listen       [::]:443 ssl http2;
        server_name  _;
        root         /usr/share/nginx/html;

        ssl_certificate "/etc/pki/nginx/server.crt";
        ssl_certificate_key "/etc/pki/nginx/private/server.key";
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_ciphers PROFILE=SYSTEM;
        ssl_prefer_server_ciphers on;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        error_page 404 /404.html;
        location = /404.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }

        location /cloud/ {
            proxy_pass http://10.0.0.2:5212/;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_redirect off;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Scheme $scheme;

            client_max_body_size 20000m;
        }
    }

I would like to share more info or logs, just ask me. Thanks all your time.

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.