Score:0

Windows NGINX reverse proxy issues proxy from http to https or advice me with config file

at flag

I have Windows Server with IP 10.0.0.5

Also added Firewall inbound Rules port 80,443,9444

This IP 100.100.50.50 external provided some company and connected with VPN tunnel with this Windows Server IP 10.0.0.5

From manual this company I should add to hostsfile In Windows server in hosts file I add this

100.100.50.50 someservice.com 127.0.0.1 loc.someservice.com

Now in windows server I install insomnia and following manual I set credentials try post like this

post https://someservice.com:9444/oauth2/token 

In Windows Server I get result success I mean I get token etc…

Now I want to try this post from another local windows machine

I install nginx in windows server

here my config

server {    
    listen 80; 
    listen 9444; 
    server_name loc.someservice.com:9444;
    location / {
     proxy_pass someservice.com:9444;
     proxy_set_header Host $host;
     proxy_set_header Host someservice.com;
     proxy_set_header X-Forwarded-Proto https;
     proxy_ssl_name $host;
     proxy_ssl_server_name on;
     proxy_ssl_session_reuse off;
   } 
 }

In my local machine

I set hosts IP windows server

10.0.0.5 loc.someservice.com

I post in my local machine via Insomnia like this

post http://loc.someservice.com:9444/oauth2/token    

Get error

   Bad request 400

Thanks a lot for your help :-)

bjoster avatar
cn flag
It looks like everyting you wrote is workig, because the webserver is working. When the webservice is returning `400` check the webservice and its logs.
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.