Score:0

Cant handle HTTPS request to HTTP with specified port at Nginx

ve flag

So I have one server. Let it be server example.com (where SSL is working good) From this server I am sending request to other server called server2.example.com (other location) I am sending such requests

https://server2.example.com:8001/blba/blac
https://server2.example.com:8003/blba/blac
https://server2.example.com:8005/blba/blac

At this server2.example.com i have installed nginx with SSL wich is working pretty nice.Those ports (8001,8003 and so on) are some services. Some of them written or goland, some on python and so on.

Issue. Those https requests are not handling. It is handling if i send http://server2.example.com:8001/blba/blac but of course i need HTTPS to work it. I can't setup this services work with HTTPS, they are working only with http

So I need to configurate nginx some how.

Currenly my nginx at this server2.example.com is looks like

  server {

        server_name blabla
        root /var/www;

     listen 443 ssl;

 location / {
        proxy_pass http://127.0.0.1:8003;
        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 https;
    }



}

p.s i removed some sting to make it shorter(like ssl sertificates and so on)

This proxy_pass i tryied but no luck

Generaly here is a screen what i need to get and what i have(sorry for the red) Here is curl with http and https

djdomi avatar
za flag
dont post plain text errors as image, use codeblock the codeblock like above for the config to show the errors.
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.