Score:0

nginx reverse proxy https to http

gh flag

I have a Linux server, on which I created a public web app (as a test) accessible here: http://tropo.gps.caltech.edu:9384/jsserve

It works as intended. As you can see, it is served on port 9384 with http protocol.

However, I would like to have this public web app accessible via https. I do have SSL certificate, but I want to use another port than 443.

Here is my nginx configuration file: (the relevant bits)

server {
    listen 44301 ssl; 

    ssl_certificate [...];
    ssl_certificate_key [...];

    server_name tropo.gps.caltech.edu;

    location /jsserve {
        proxy_pass http://tropo.gps.caltech.edu:9384;
    }
}

It seems that I am doing something wrong, as I generate this: https://tropo.gps.caltech.edu:44301/jsserve , https is crossed in red and "not secured" warning appears. Moreover, my web apps is not working (a slider appear, it can be moved, but there is no response).

Am I doing something wrong?

Jaromanda X avatar
ru flag
`tropo.gps.caltech.edu:44301 uses an invalid security certificate. The certificate is not trusted because it is self-signed.` - looks like you don't understand the warning, your self signed certificate isn't trusted, but you can trust it if you want
Alexandre Renchon avatar
gh flag
You're right, I changed the settings in my browser for https://tropo.gps.caltech.edu:44301/jsserve (allow insecure content) and it worked. The problem is that mixed content, due to my invalid security certificate I imagine. Thanks for pointing this.
Jaromanda X avatar
ru flag
`The problem is that mixed content, due to my invalid security certificate` - no, mixed content in a web page is a problem when a page loaded using `https` tries to load a resource (css, js, etc) using `http` ...
Reishin avatar
sa flag
mixed content come due to application hardcode the path in-to the content, which wouldn't be replaced by nginx. To fix that, you can instruct nginx to rewrite the content or you could fix the application to properly generate links or use relative ones.
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.