Score:0

Reverse Proxying 2 servers not working on nginx

us flag

NOTE: I fixed the reverse proxying thing by just restarting, seems like 127 days of uptime was too much for my windows desktop. I still need help with the ssl part so any help would be really appreciated.

SSL Problem

As for the SSL part, I cannot guess why does it not work. Here is my full and final configuration for kra.domain.in

worker_processes auto;

events {
    worker_connections 768;
}
 
http {
    server {
        listen   80;
        server_name kra.domain.in www.kra.domain.in;

        location / {
            proxy_pass http://127.0.0.1:5500;
        }
    }

    server {
        listen   443 ssl;
        server_name kra.domain.in www.kra.domain.in;

        ssl_certificate    /nginx/ssl/ssl-bundle.crt;
        ssl_certificate_key    /nginx/ssl/private.key;

        location / {
            proxy_pass http://127.0.0.1:5500;
        }
    }
}

This is my Virtual IP group on my Fortinet Firewall Virtual IPv4 Group on Firewall

I have also updated the administration settings to not use 443 port.

As for the SSL Certificate, I used ZeroSSL to generate my SSL Certificate, and followed the steps provided at this link: https://help.zerossl.com/hc/en-us/articles/360058295894-Installing-SSL-Certificate-on-NGINX

I merged the files using cat (git bash) and you can see my hosts file there. I have no further clue why would this not work.

Fixed Problem, this problem was fixed, please help on the above one

I have been having this problem for about a week now, and I thought of asking this here because well nothing else worked.

So, I am using nginx on windows, and have reverse proxied my external/public IP to 127.0.0.1:5500. That worked sufficiently at the time, about a month ago but I couldn't get ssl working, we will get back to it in a second. This was my configuration for single reverse proxy on my domain kra.domain.in, and it worked flawlessly, and still works flawlessly. Except for the SSL part which wasn't mandatory for my application to work, but I am considering to add SSL there because I might need it.

So, the SSL didn't work in my case the commented configuration is what I used for the SSL part, port 443 is open from my firewall too. I got the certificate from ZeroSSL, and nginx gave me no errors for the configuration or key matching part either, just the 443 port or https port of my network didn't respond.

djdomi avatar
za flag
Is that a Public domain that you are willing to tell, and or what ies meaned with "My network" - is this hosted at home?! And is /nginx really exists? It is a non default path.
SwagBeast SKJJ avatar
us flag
nginx works sufficiently, and yes that is a public domain, I guess I found the problem, I will catch up on my problem after asking someone to open the 443 port, my guess is that it isnt open because https works on my local ip (192.168.1.120), but on the public ip, managed by my firewall it fails.
SwagBeast SKJJ avatar
us flag
And no, not really home, this is hosted on my office network.
djdomi avatar
za flag
I hope you know what you are doing. It doesn't sound like so.
SwagBeast SKJJ avatar
us flag
uh sorry but I do know what I am doing, if not exactly what I am doing, and I fixed the problem too, I just messed up the local ip of my machine (used 192.168.0.120 instead of 192.168.1.120)
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.