Can I route HTTPS requests to HTTP application, using IIS7 ARR? - iis

I have an application server installed, listening for HTTP traffic on a port which is not blocked from the world by a firewall. I wish to expose the services offered by this application only through HTTPS, preferably as a "sub directory" of the HTTPS site already hosted by the server.
Using IIS7 Url Rewriting (as part of the ARR package), I am able to setup a rule that redirects all traffic to a sub path of my existing HTTPS site. However, I am facing some trouble, when trying to make the same rule route to my server farm setup - all requests matching the rule simply get 404 reponses. Adding the very same rule to a non-SSL site, yields the expected behaviour - the application services are proxied right trough.
What might be wrong in my setup? Is ARR proxying the HTTPS requests as HTTPS traffic to the application server? The application I want to host does not have a HTTPS interfaces so, if yes: can I tell it not to do so?

Yes, I can use IIS7/ARR to route HTTPS requests to HTTP application.
The problem I experienced, was caused by the fact that the web site I wanted to use as the "container" for the proxy directory was buildt with ASP.NET MVC. The URL routing framework within ASP.NET interfered with the IIS url rewriting, and causes the 404 error.

Related

URL rewrite http to https not working for WCF web application in IIS

I have added URL rewrite for Http to Https for website. But website has many web applications and URL rewriting is not working for web applications. It is showing 404 error
followed this url for http tp https https://www.ssl.com/how-to/redirect-http-to-https-with-windows-iis-10/
added rule to default website. but rule not working for web applications. How to apply rule to web applications too?
https://www.xyz1.com has url. I can see rule on web.config
https://www.xyz1.com/subsite/Testweb.svc - not working. rule not found in web.config

Redirecting HTTPS call to a .NET Core Web API with IIS and Kestrel

hopefully someone can help me.
This is the scenario I want to implement:
Server A has IIS installed and hosts a web app "mysite.com" and some web apis.
Server B has a .NET Core Web API hosted as a Windows Service.
When a client makes a request to a specific port like "mysite.com:9091/api/get-value"
I would like for IIS to re-route that call with same payload to server B on "myapi:9091/api/get-value" through HTTP.
The reason I want to do this is because We have authentication and certificates already configured on Server A, and also we want all incoming requests to go through the main site.
I have been reading on reverse proxy with IIS, and it would seem to be what I need, but it's not clear if the hosted app that will be running under Kestrel must be on the same physical machine as the IIS Web Server (i.e. Server A), or I can re-route to whichever other server I want, as long as it's on same network.
Any thoughts will be appreciated.
Hopefully my question is clear enough, otherwise please do let me know and I'll try to rephrase.
It is not necesarray to have both kestrel and iis on same server.
You could use the iis URL rewrite rule and reverse proxy to forward the request to the Kestrel server:
https://techcommunity.microsoft.com/t5/iis-support-blog/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world/ba-p/846222
Host ASP.NET Core on Windows with IIS
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.1

How to rewrite URL based on http status code (IIS)

I am configuring a IIS reversed proxy that rewrite the URL and redirect request to an IIS server (ServerA) that serves a web service. In the case of failure, for example, a 503 http status code returned by the web service. I would like to rewrite the URL and redirect the request to another IIS server(ServerB) that serves a mirrored copy of the web service. Is this achievable? Thanks!

Handling multiple applications under the same domain

I am having a application build using pimcore (ZendFramework) which is hosted on a Linux EC2 (Apache) instance and one more application which is hosted on Windows IIS.
Now I want both of these applications to run in the following manner:
http://example.com/app1 will redirect to pimcore
http://example.com/app2 will redirect to application hosted on IIS
I can't use subdomains for this. I was trying to use URL Rewrite (ARR) of IIS. But ZendFramework is giving the following error:
Zend_Controller_Router_Exception No route, document, custom route or redirect is matching the request
You'll need a third web server to act as a reverse proxy. This could be an Apache or a Nginx instance for example.
The reverse proxy will serve your main domain on port 80 and decide what address to contact in order to provide the appropriate content.

IIS 7.5 Reverse Proxy Implementation

I am curious to understand how IIS 7.5 Reverse Proxy is implemented in Rewrite Module (v2).
I am planning to setup a website that will handle proxing between requests coming from users (internet) and my HTTP services that are deployed on the same server. I have setup a website within IIS and configured the reverse proxy logic. I've then setup another website on the same server and deployed all my WCF REST services there. I am planning to implement IIS offloading, common tasks (such as authentication, etc) on the reverse proxy website before the request gets to the actual services (like WCF routing service for SOAP). Configuration is working perfectly fine.
However I am trying to understand the implications of this setup. When IIS does reverse proxing, does it create a new HTTP request (and a new TCP port) between those two websites? And even if both sites are on the same server? Should I expect number of TCP connections opened on this server to get doubled when reverse proxy is used?
Furthermore, has anyone experienced any performance/resource issues with a similar setup?
Cheers,
OS

Resources