Score:0

reverse proxy for nodejs application with https

in flag

Hi I am hosting a node js application on my raspberry pi. The app itself is already configured to use https. I want to setup a reverse proxy so I don't need to directly expose the node js app.

but the following setup gives me a screen with authorization required written on it.

/etc/nginx/sites-enabled/alfred.taiman.co.uk.conf

    server {
    listen 80;
    return 301 https://$host$request_uri;
}
server {

    listen 443;
    server_name alfred.taiman.co.uk;

    access_log            /var/log/nginx/alfred.access.log;

    location / {

      proxy_set_header        Host $host;
      proxy_set_header        X-Real-IP $remote_addr;
      proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header        X-Forwarded-Proto $scheme;

      proxy_pass          https://alfred.local:883;
      proxy_read_timeout  90;

      proxy_redirect      http://alfred.local:883 https://alfred.taiman.co.uk;
    }

}
ws flag
You've told us nothing about the node.js application - based on the information you provided it is that application requiring authentication. Suggest you review its config, check its logs and try accessing it directly.
user20338 avatar
in flag
The application doesn't need authentication. When I access it directly i.e. alfred.local:883 I get my webpage.
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.