question

AriefHardiansyah-8548 avatar image
0 Votes"
AriefHardiansyah-8548 asked BruceZhang-MSFT commented

Publish Multiple Application Pool Using IIS ARR Reverse Proxy

We've 1 Server application internal with 3 Applications pool inside the IIS Application Pool Settings with details:

-Default Web Site

contoso_A > application that worked & published.
contoso_B
contoso_C

internal url: http://peps.contoso_A.co.id/login.aspx

Currently we already publish those applications pool using ARR reverse proxy & configured URL Rewrite with external URL http://peps.pcino.fabricam.com
but when we open the external url it shows like the capture below:

192224-microsoftteams-image-9.png


Is there any configuration that we missed ?
how to make the external url will direct to application contoso_A ?


windows-serverwindows-server-iis
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AriefHardiansyah-8548 ,

Can you show the bind information of the default web site and default web page setting? Then I need to know your url rewrite rule and how you configure reverse proxy.

0 Votes 0 ·
AriefHardiansyah-8548 avatar image
0 Votes"
AriefHardiansyah-8548 answered

Hi @BruceZhang-MSFT thanks for your response. Sorry for just replying because it's a national holiday at my place the last few days, the following capture details as you requested:

Detail bind Information:
193728-bind-01.png


193729-bind-02.png


193769-bind-03.png


193735-bind-04.png


Detail URL Rewrite:

193801-peps-01.png



193730-peps-02.png


193802-peps-03.png


Here my explanation for current configuration

For access the application we are using Internal URL:
pcjkt-webint-eproc.contoso.com/PEPS_INTERNAL/Login.aspx

and for the goal we want to access the application with an external URL:
peps.pcino.fabricam.com

when we access the application using an external URL peps.pcino.fabricam.com only the iis page appears (as in the picture above)

but when we access using external URL peps.pcino.fabricam.com/PEPS_INTERNAL/Login.aspx we can open the application normally.
kindly need your help. is there any additional configuration that we have to do?





bind-01.png (101.8 KiB)
bind-02.png (38.8 KiB)
bind-03.png (53.2 KiB)
bind-04.png (114.7 KiB)
peps-01.png (15.6 KiB)
peps-02.png (19.1 KiB)
peps-03.png (21.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BruceZhang-MSFT avatar image
0 Votes"
BruceZhang-MSFT answered BruceZhang-MSFT commented

Hi @AriefHardiansyah-8548 ,

This is a default behavior of IIS by design. Please check your rule and url.

When you use external URL http://peps.pcino.fabricam.com, it matches the rule and host is right. So IIS will route it to server by change the domain to http://pcjkt-webint-eproc.contoso.com. The URI of external URL is empty, so {R:0} is also empty. Then http://pcjkt-webint-eproc.contoso.com hit on default web site. IIS has a module called Default Document, it will return a specific file when URL doesn't request a specific file. iisstart.htm is the default file IIS return.
194014-1.png

When you use external URL http://peps.pcino.fabricam.com/PEPS_INTERNAL/Login.aspx, it matches the rule and {R:0} is PEPS_INTERNAL/Login.aspx. So the URL hits on default web site is http://pcjkt-webint-eproc.contoso.com/PEPS_INTERNAL/Login.aspx which points to login.aspx in PEPS_INTERNAL application.

The solution I can think of is adding a rewrite rule in default web site to redirect default page.

  1. Disable default document first.
    194025-2.png

  2. Create a rule at default web site level.

  3. Pattern is ^$.
    194083-3.png

  4. Rewrite URL is http://pcjkt-webint-eproc.contoso.com/PEPS_INTERNAL/Login.aspx.



If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Best regards,
Bruce Zhang



1.png (232.1 KiB)
2.png (49.5 KiB)
3.png (46.6 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @BruceZhang-MSFT.

Really appreciate for your answer,
We want to ask one more question. is it possible when we type on browser with URL peps.pcino.fabrican.com it'll automatically direct to https://peps.pcino.fabricam.com/PEPS_INTERNAL/Login.aspx ?

Kindly need your help and advice.
Thanks in advance.

0 Votes 0 ·
BruceZhang-MSFT avatar image BruceZhang-MSFT AriefHardiansyah-8548 ·

Hi @AriefHardiansyah-8548 ,

If the rewrite URL of the rule is http://pcjkt-webint-eproc.contoso.com/PEPS_INTERNAL/Login.aspx, it won't redirect to https://peps.pcino.fabricam.com/PEPS_INTERNAL/Login.aspx. Because peps.pcino.fabrican.com is an external domain and doesn't bind to the default web site. It binds to the ARR server so that DNS can map the https://peps.pcino.fabricam.com to IP of ARR server not application server.

0 Votes 0 ·
AriefHardiansyah-8548 avatar image
0 Votes"
AriefHardiansyah-8548 answered BruceZhang-MSFT commented

Hi @BruceZhang-MSFT really appreciate your advice.
where we can set this settings into ? in ARR Server or in Application Server ?
we will disable the default document, but the order in our IIS is different from yours

194437-disable-document.png


which one should we disable?
is it default.aspx or default.htm or both?

FYI
we use the ARR server to publish other apps too




· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AriefHardiansyah-8548 ,

You don't need to worry it. When you click disable, it will disable Default Document module whatever files it has.
The order of these files only affects which file IIS displays first when default document module is enabled. The prerequisite is that all listed files are included in the folder of the website.

0 Votes 0 ·

Thanks for your answer.
where we can set this settings into ? in ARR Server or in Application Server ?

0 Votes 0 ·
BruceZhang-MSFT avatar image BruceZhang-MSFT AriefHardiansyah-8548 ·

Hi @AriefHardiansyah-8548 ,

You need to set it in application server. Just choose the site you host the application. Then open default document module.

0 Votes 0 ·
Show more comments