I cannot pass the login pageRSS

2 replies

Last post May 13, 2020 05:55 AM by jorgen82

  • I cannot pass the login page

    May 08, 2020 03:33 PM|jorgen82|LINK

    Hello

    I am trying to do a basic reverse proxy from an IIS on our DMZ to a web server (believe its using nginx). I want to keep it very simple, so the https traffic to site1.mydomain.com to be redirected to the http site as-site1:22185.

    The redirection works and the start page appears fine. The problem is that when i click the login button in order to proceed, nothing happens. The login account is just hardcoded on the site and no AD authentication occurs (for now at least).

    I am newbie on web servers, so apologies of my ignorance. It might be something very simple that i overlook. 

    	<rewrite>
                <outboundRules>
                    <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
                        <match filterByTags="A, Form, Img" pattern="^http(s)?://as-site1:22185/(.*)" />
                        <action type="Rewrite" value="http{R:1}://site1.mydomain.com/{R:2}" />
                    </rule>
                    <preConditions>
                        <preCondition name="ResponseIsHtml1">
                            <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                        </preCondition>
                    </preConditions>
                </outboundRules>
                <rules>
                    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                        <match url="(.*)" />
                        <action type="Rewrite" url="http://as-site1:22185/{R:1}" logRewrittenUrl="true" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="site1\.mydomain\.com*" />
                        </conditions>
                    </rule>
                </rules>
            </rewrite>

    Thanks

    George

  • Re: I cannot pass the login page

    May 11, 2020 07:07 AM|Yuk Ding|LINK

    Hi Jorgen82,

    If the Button failed in reverse proxy environment. It might means callback request failed for some reason. So please go to your web browser-> F12 developer. Reproduce this issue and check whether callback request returned 404 and what error message are displayed in Authentication. Please post these error message or corrupted message. Then we may find the root cause.

    Best Regards,

    Jokies Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: I cannot pass the login page

    May 13, 2020 05:55 AM|jorgen82|LINK

    Hello

    Thanks for your reply.

    I am receiving the below 2 errors at the login page. Same errors when pressing the login button. The 22185 stating in the first error, is the port of the internal server and of course not accessible from outside therfore it fails. But why the request goes to http://site1.mydomain.com:22185/login. Shouldn't it be sent to http://as-site1:22185/login? Unless of course something wrong with the rewrites.

    Mixed Content: The page at 'https://site1.mydomain.com/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://site1.mydomain.com:22185/login'. This request has been blocked; the content must be served over HTTPS.

    Uncaught (in promise) Error: Network Error chunk-vendors.4bc618eb.js:43 Uncaught (in promise) Error: Network Error
    at t.exports (chunk-vendors.4bc618eb.js:43)
    at XMLHttpRequest.h.onerror (chunk-vendors.4bc618eb.js:138)

    Thanks

    George