cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
haku
Level 7
Report Inappropriate Content
Message 1 of 2

502: bad gateway with HTTPS rule

Jump to solution

Hello,

I am new and in need of help. What I currently have is a nginx webserver (referred to as: web-server). It is listening on hostname and ip with port 80 (HTTP), 8998 (HTTPS) and 443 (HTTPS). When I call the server by its name or ip it will work on any port 80 with http and the others with https.

What I try to do now is forwarding a non-existent domain (referred to as: dest-domain) to this server.

If I create a rule that will redirect the domain to the server it works. I can type in my browser http://dest-domain/ and it will be redirected but also renamed to http://dest-domain/. But I want it to be http://dest-domain/.

If I create rule that will forward the call it wiorks with HTTP but not HTTPS. So if I create a rule that will forward "dest-domain" to IP: "<web-server-ip>" Port: 80 it works. I can call http://dest-domain/ and I get the content of the webserver but the browser still shows http://dest-domain.

But if I create a rule that forward "dest-domain" to IP: "<web-server-ip>" Port: 443 or 8998 it doesn't work. If I type in http://dest-domain I will obviously get an error 400 bad request because I try to speak HTTP on an HTTPS connection and thats what I get as answer but if I change the call to https://dest-domain I always get a 502 bad gateway.

Am I missing something here? Maybe a logical mistake or did anyone else have this issue?

Thank you very much! Hopefully any of you has any idea.

1 Solution

Accepted Solutions

Re: 502: bad gateway with HTTPS rule

Jump to solution

NHP was being used here  and in NHP Settings  Proxy style requests option was enabled  which was causing the issue

View solution in original post

1 Reply

Re: 502: bad gateway with HTTPS rule

Jump to solution

NHP was being used here  and in NHP Settings  Proxy style requests option was enabled  which was causing the issue

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community