IIS 502 - Web server received an invalid response while acting as a gateway or proxy serverVisualSVN Server...

Professor forcing me to attend a conference

New invention compresses matter to produce energy? or other items? (Short Story)

The past tense for the quoting particle って

Should I use HTTPS on a domain that will only be used for redirection?

PTIJ: Aliyot for the deceased

3.5% Interest Student Loan or use all of my savings on Tuition?

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

Learning to quickly identify valid fingering for piano?

Why can't we use freedom of speech and expression to incite people to rebel against government in India?

Remove object from array based on array of some property of that object

What is the oldest European royal house?

Are there other characters in the Star Wars universe who had damaged bodies and needed to wear an outfit like Darth Vader?

Should we avoid writing fiction about historical events without extensive research?

Can a Mexican citizen living in US under DACA drive to Canada?

The Key to the Door

Ultrafilters as a double dual

Replacing tantalum capacitor with ceramic capacitor for Op Amps

Paper published similar to PhD thesis

How do you make a gun that shoots melee weapons and/or swords?

Affine transformation of circular arc in 3D

ESPP--any reason not to go all in?

Deal the cards to the players

Integrating function with /; in its definition

School performs periodic password audits. Is my password compromised?



IIS 502 - Web server received an invalid response while acting as a gateway or proxy server


VisualSVN Server working through IIS on 443Route http web requests to Plex port on same serverWhy a listen 443 default_server; nginx rule override already configured rule (http rules working normal way)?Reverse proxy 502 bad gatewaynginx http to https proxy with self-signed certificateReverse Proxy? For devices(without internet access), in a LAN with an IIS(that has internet) + SSL external websiteWindows Container port binding on Windows Server 2016 not workingRedirect HTTP to HTTPS on Synology NASNginx default configuration file issue













1















I have a problem with a configuration on a IIS service, basically we get an 502 error when we want to establish an https connection. To be honest I am developer not a sysadmin but I am helping a colleage with this issue.



The following parameters are currently setted:



Server Name : XXX
Web Server : IIS ( Windows server 2012)
(HTTP) only for testing
FrontEnd - Angular / Port 80

BackEnd - Java / Port 8787



(HTTPS) this is the goal configuration.
FrontEnd - Angular / Port 443
BackEnd - Java / Port 9787



Only https://XXX:443/* is available for endUser



So, in Dev environment there's no problem because all ports are available for everybody.
In production, the endusers only can access to one port.
Supposedly if we configure properly the proxy in IIS we can use it to call the backend.



The proxy works for HTTP (port 80), but when for HTTPS(443) we have the error "502 - Web server received an invalid response while acting as a gateway or proxy server"



This is the web.config for HTPPS



<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="https://localhost:9787/iam-b2e-backend/{R:1}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


For HTTP



 <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ForwardProxy">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:8787/iam-b2e-backend/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>









share|improve this question





























    1















    I have a problem with a configuration on a IIS service, basically we get an 502 error when we want to establish an https connection. To be honest I am developer not a sysadmin but I am helping a colleage with this issue.



    The following parameters are currently setted:



    Server Name : XXX
    Web Server : IIS ( Windows server 2012)
    (HTTP) only for testing
    FrontEnd - Angular / Port 80

    BackEnd - Java / Port 8787



    (HTTPS) this is the goal configuration.
    FrontEnd - Angular / Port 443
    BackEnd - Java / Port 9787



    Only https://XXX:443/* is available for endUser



    So, in Dev environment there's no problem because all ports are available for everybody.
    In production, the endusers only can access to one port.
    Supposedly if we configure properly the proxy in IIS we can use it to call the backend.



    The proxy works for HTTP (port 80), but when for HTTPS(443) we have the error "502 - Web server received an invalid response while acting as a gateway or proxy server"



    This is the web.config for HTPPS



    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
    <match url="(.*)" />
    <action type="Rewrite" url="https://localhost:9787/iam-b2e-backend/{R:1}/{R:1}" />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>


    For HTTP



     <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="ForwardProxy">
    <match url="(.*)" />
    <action type="Rewrite" url="http://localhost:8787/iam-b2e-backend/{R:1}" />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>









    share|improve this question



























      1












      1








      1








      I have a problem with a configuration on a IIS service, basically we get an 502 error when we want to establish an https connection. To be honest I am developer not a sysadmin but I am helping a colleage with this issue.



      The following parameters are currently setted:



      Server Name : XXX
      Web Server : IIS ( Windows server 2012)
      (HTTP) only for testing
      FrontEnd - Angular / Port 80

      BackEnd - Java / Port 8787



      (HTTPS) this is the goal configuration.
      FrontEnd - Angular / Port 443
      BackEnd - Java / Port 9787



      Only https://XXX:443/* is available for endUser



      So, in Dev environment there's no problem because all ports are available for everybody.
      In production, the endusers only can access to one port.
      Supposedly if we configure properly the proxy in IIS we can use it to call the backend.



      The proxy works for HTTP (port 80), but when for HTTPS(443) we have the error "502 - Web server received an invalid response while acting as a gateway or proxy server"



      This is the web.config for HTPPS



      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      <system.webServer>
      <rewrite>
      <rules>
      <rule name="ReverseProxyInboundRule1" stopProcessing="true">
      <match url="(.*)" />
      <action type="Rewrite" url="https://localhost:9787/iam-b2e-backend/{R:1}/{R:1}" />
      </rule>
      </rules>
      </rewrite>
      </system.webServer>
      </configuration>


      For HTTP



       <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      <system.webServer>
      <rewrite>
      <rules>
      <rule name="ForwardProxy">
      <match url="(.*)" />
      <action type="Rewrite" url="http://localhost:8787/iam-b2e-backend/{R:1}" />
      </rule>
      </rules>
      </rewrite>
      </system.webServer>
      </configuration>









      share|improve this question
















      I have a problem with a configuration on a IIS service, basically we get an 502 error when we want to establish an https connection. To be honest I am developer not a sysadmin but I am helping a colleage with this issue.



      The following parameters are currently setted:



      Server Name : XXX
      Web Server : IIS ( Windows server 2012)
      (HTTP) only for testing
      FrontEnd - Angular / Port 80

      BackEnd - Java / Port 8787



      (HTTPS) this is the goal configuration.
      FrontEnd - Angular / Port 443
      BackEnd - Java / Port 9787



      Only https://XXX:443/* is available for endUser



      So, in Dev environment there's no problem because all ports are available for everybody.
      In production, the endusers only can access to one port.
      Supposedly if we configure properly the proxy in IIS we can use it to call the backend.



      The proxy works for HTTP (port 80), but when for HTTPS(443) we have the error "502 - Web server received an invalid response while acting as a gateway or proxy server"



      This is the web.config for HTPPS



      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      <system.webServer>
      <rewrite>
      <rules>
      <rule name="ReverseProxyInboundRule1" stopProcessing="true">
      <match url="(.*)" />
      <action type="Rewrite" url="https://localhost:9787/iam-b2e-backend/{R:1}/{R:1}" />
      </rule>
      </rules>
      </rewrite>
      </system.webServer>
      </configuration>


      For HTTP



       <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      <system.webServer>
      <rewrite>
      <rules>
      <rule name="ForwardProxy">
      <match url="(.*)" />
      <action type="Rewrite" url="http://localhost:8787/iam-b2e-backend/{R:1}" />
      </rule>
      </rules>
      </rewrite>
      </system.webServer>
      </configuration>






      networking proxy https iis reverse-proxy






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 12 '18 at 11:45







      MadDev

















      asked Jan 12 '18 at 11:29









      MadDevMadDev

      65




      65






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Problems like poor performance on some requests, or authentication-related failures on other requests, or the server 500 error from ASP or ASP.NET can often be difficult to troubleshoot--unless you have captured the trace of the problem when it occurs. the following article discusses failed request tracing on IIS Server.
          This article contains detailed information. can help you



          https://docs.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis



          https://dailytechposts.com/http-error-502/






          share|improve this answer








          New contributor




          brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1284859%2fiis-502-web-server-received-an-invalid-response-while-acting-as-a-gateway-or-p%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Problems like poor performance on some requests, or authentication-related failures on other requests, or the server 500 error from ASP or ASP.NET can often be difficult to troubleshoot--unless you have captured the trace of the problem when it occurs. the following article discusses failed request tracing on IIS Server.
            This article contains detailed information. can help you



            https://docs.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis



            https://dailytechposts.com/http-error-502/






            share|improve this answer








            New contributor




            brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

























              0














              Problems like poor performance on some requests, or authentication-related failures on other requests, or the server 500 error from ASP or ASP.NET can often be difficult to troubleshoot--unless you have captured the trace of the problem when it occurs. the following article discusses failed request tracing on IIS Server.
              This article contains detailed information. can help you



              https://docs.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis



              https://dailytechposts.com/http-error-502/






              share|improve this answer








              New contributor




              brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.























                0












                0








                0







                Problems like poor performance on some requests, or authentication-related failures on other requests, or the server 500 error from ASP or ASP.NET can often be difficult to troubleshoot--unless you have captured the trace of the problem when it occurs. the following article discusses failed request tracing on IIS Server.
                This article contains detailed information. can help you



                https://docs.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis



                https://dailytechposts.com/http-error-502/






                share|improve this answer








                New contributor




                brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                Problems like poor performance on some requests, or authentication-related failures on other requests, or the server 500 error from ASP or ASP.NET can often be difficult to troubleshoot--unless you have captured the trace of the problem when it occurs. the following article discusses failed request tracing on IIS Server.
                This article contains detailed information. can help you



                https://docs.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis



                https://dailytechposts.com/http-error-502/







                share|improve this answer








                New contributor




                brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 22 hours ago









                brianbrian

                1




                1




                New contributor




                brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                brian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1284859%2fiis-502-web-server-received-an-invalid-response-while-acting-as-a-gateway-or-p%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                    Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...