Skip to content

Setting up IIS as a reverse proxy

Overview

tl;dr;

This post is all about setting up IIS(8.5) in order to be used as a reverse proxy.

Use multiple different Webservers (IIS/Apache/Tomcat) and run them on the same server and port.

Installing IIS

Just install IIS by using the add roles and feature functionality of windows server 2012

Installing apache

I currently have the problem that I own a windows 2012 virtual server, and need to run IIS and Apache on it. Installation is actually super easy, just install IIS and then Apache (I took the apache binaries for windows from apachehaus )

But if you now try to start apache, the following error will show up:

(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : AH00072: make_sock: could not bind to address [::]:80

image_thumb

This happens because I'm trying to open port 80 with apache while port 80 is already used by IIS.  And the same would happen when I try to start Tomcat or any other server which tries to run on port 80.

This error can be avoided by setting the Listen Port  of apache to anything different than port 80, i.e. 8080. Problem with this solution is that any site served by apache can only be reached via port 8080 which is super uncool since a user then has to enter the port 8080 together with the domain name.

Setup IIS

In order to use IIS as a reverse proxy, the rewrite module must be installed. This can be done by downloading it from the microsoft website

image_thumb6

To get rewrite(Not only redirect) working, the application request routing must be installed as well from the microsoft website

Now the Application Request Routing must be configured in IIS manager. It's as simple as checking the Enable proxy checkbox.

image_thumb8

image_thumb10

Now a new website must be added in IIS pointing to an empty directory. In order for IIS to act properly as a proxy, this website must be bound to a host name. (For this demo and since I don't have a hostname, I just added a entry into the host file of the computer)

image_thumb4

When now connecting to this site, noting must be shown since there is no content in the configured folder.

Next step is to setup the rewrite rule.

Setup rewrite rule in IIS

Add a new Blank rule via URL rewrite

image_thumb15

image_thumb14

The rule must look like the following sample.

This is the corresponding web.config to the screenshot below:



    <system.webserver>
        
            
                
                    
                    
                
            
        
    </system.webserver>

image_thumb17

Done

Now it's done. Requests sent to proxytest.com:80 will be rewritten from IIS to the address from rewrite URL.

With this configuration, it's possible to run IIS, Apache, Tomcat and many other webserver at the same time on the same server under the same port.

Great thing.

Trackbacks

Comments

Display comments as Linear | Threaded

Mobilier de bureau Toulouse on :

Nous sommes l'un des principaux fournisseurs de mobilier de bureau de qualité supérieure pour différents types de clients allant des clients de petite taille aux plus grands. Nous assurons la supply chain de mobilier de bureau pour tous types de clients à Toulouse. En tant que fournisseur fiable de meubles de la meilleure qualité, nous nous concentrons principalement sur la qualité et offrons les meilleurs meubles aux prix les plus abordables. Nous fournissons les meilleures collections du Mobilier de bureau Toulouse de qualité supérieure selon les besoins et les demandes du client. Si vous souhaitez réserver des commandes en ligne, vous pouvez nous choisir simplement. Tous nos produits sont fabriqués à partir de matériaux de qualité supérieure et sont spécialement conçus par des artisans et des designers professionnels. Ces produits sont basés sur les dernières conceptions, afin que chaque client puisse ressentir beaucoup de confort. Notre meilleure collection de mobilier de bureau peut refléter votre style de vie, vous pouvez donc choisir nos meubles de qualité supérieure à des prix raisonnables. Afin de satisfaire chaque client par nos produits, nous fabriquons les meilleurs produits dans notre maison. Nous nous concentrons principalement sur les produits de qualité, les délais de livraison et les tarifs raisonnables. Si vous souhaitez acheter le mobilier de bureau à Toulouse, vous pouvez nous choisir pour faire les meilleures offres à des tarifs raisonnables.

Simon Walking Dead on :

I Was Eagerly Looking For Content Like This, Right To The Point And Detailed As Well Accordingly Depending Upon The Matter/Topic. You Have Managed This Greatly For Sure.

Klaus Hargreeves Fur Coat on :

I am so happy to come across this piece of write up, very much advanced my understanding to the next top level. Great job and continue to do same.

kissasian on :

KissAsian Is Asian Drama Backstreet Rookie comes to an end this weekend. Before fans watch the curtain close on the series, Ji Chang Wook and Kim.

KissAsian

Dark Brotherhood Hoodie on :

The post is very amazing around the world many people want to read this type of post I am also part of them and after the reading give good reviews

saqi bikes on :

Bigg Boss is a television reality show broadcast on Colors channel in India. Later on Day 14, one of Day 1 evicted housemate enter the house as a Wild-Card.

pre-engineered buildings manufacturer in india on :

Hrsinfrastructure are one of the best, reliable and successful pre-Engineered Building Manufacturers, which is offering the affordable PEB steel structures and steel building solutions for all types of the customers. PEB are the best quality steel structures built over a designed structural concept of primary members, secondary members, wall and roof sheeting attached to each other and different other building elements. Hrsinfrastructure Having many years of experience into PEB industry, we are serving millions of the customers just by offering the best quality PEB sheets in the affordable prices. We mainly focus on the quality, durability, reliability, flexibility in the expansion, environment-friendly, and quicker installation and many others. Being a top-leading pre-engineering building manufacturer in India, we have earned vast experience and broad knowledge of completing many constructions projects using PEB steel sheets and structures. We have got higher admiration and reputation in the market just by offering the best quality PEB sheets. Our designing and engineering team is very experienced and fully knowledgeable to prepare the best PEB structures as per the residential and commercial building’s needs and demands. Our aim is to use the best quality row materials to prepare the sheets, so every customer can get the full satisfaction easily.

mobile window tinting on :

Installing apache on a windows 10 computer is difficult because it gives me an error, can you help me fix it?

article writer on :

The end result becomes a speech that is not very pleasing inclined to one part of the addressee. Hurtful language follows and the dignity of those addressed is stripped off

irfan ali on :

Bigg Boss 14 Full Show All Episde in HD Today Latest Episode New, Watch Indian Most Famous Reality Show In HD Bigg Boss 14 New Season 2020, Host Salman Khan Bigg Boss House Ful HD by Colors Tv

Thanks for sharing such a nice stuff

Cyberpunk 2077 jacket on :

That's right In this competition, it has the plated edged chance to kick out the other group. this group faces bunches of the challenges and this sort of the superfluous propensity is not useful for the group.

Yeh Rishta Kya Kehlata Hai Online on :

rom some members of Yeh Rishta Kya Kehlata Hai members testing positive for the novel Coronavirus to makers of Kaun Banega Crorepati

Yeh Rishta Kya Kehlata Hai Online

Bigg Boss 14 on :

Bigg Boss 14 Full Show All Episde in HD Today Latest Episode New, Watch Indian Most Famous Reality Show In HD Bigg Boss 14 New Season 2020, Host Salman Khan Bigg Boss House Ful HD by Colors Tv

Bigg Boss 14 Bigg Boss 14 Watch All Episodes Online HD Thanks for sharing such a nice stuff biggboss14watchlive.com

Kasauti Zindagi Ki Full Episodes on :

Watch the latest episodes of popular Star Plus UK show, Kasautii Zindagii Kay through online Access all the latest Hindi TV shows and videos through

Kasauti Zindagi Ki Full Episodes

[url=https://kasautii2.com/]Kasauti Zindagi Ki Full Episodes[/url]

Web designing services in Dubai on :

WonderMouse Technologies is web designing company, which provides web designing services in Dubai. The company provides cost-competitive website design and development solutions to start-ups, SME’s and enterprises. Our well-organized, flexible and transparent processes help us create Web Design Services or solutions that meet client’s present as well as future demands. The expert professionals of website design company in Delhi can meet all your requisites efficiently and as a mobile application development company in India, we focus on the goals, budget, and success of the businesses. Whether you are looking for best mobile app development services, desktop or web apps development services or web designing services, Wondermouse technologies is top destination for all your requirements. Our dedicated team of designers, developers use the best tools in order to ensure the best deliverables for every project.

Bigg Boss 14 Episodes on :

I was also searching IIS as a reverse proxy setup Oh Dude you did it, Thanks a Lot

Security Guard Course on :

I truly like you're composing style, incredible data, thankyou for posting.

Watch Bigg Boss 14 All Episodes on :

Bigg Boss 14 Online Application Form · Now, you have to search for the auditions and then click on apply now.An application form will appear.

Watch Bigg Boss 14 All Episodes

Astro Citra Live on :

Tonton Dramas is a intresting dramas serial by malalysian chanel Tonton, Tv3, Astro Ria, Astro Prima and Astro Citra.Tonton Dramas watch online all episodes and download free HD quality videos.

Astro Citra Live

Anonymous on :

Bigg Boss 14 Full Show All Episde in HD Today Latest Episode New, Watch Indian Most Famous Reality Show In HD Bigg Boss 14 New Season 2020, Host Salman Khan Bigg Boss House Ful HD by Colors Tv

Bigg Boss 14 Bigg Boss 14 Watch All Episodes Online HD Thanks for sharing such a nice stuff

unique submission on :

When it comes to providing best assignment service online, Unique Submission makes sure to complete assignment antecedently to offer scholars enough time to proof read the given assignment before submitting it to their tutors/professors. We never compromise to timely delivery and deadlines given by our customers.

Get The Best Assignment Help From Best Assignment Helpers Online

kissasian on :

Watch and download free Korean dramas, movies, Kshow and other Asian dramas with english subtitles online free. kissasian for everyone

Add Comment

You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Markdown format allowed
Form options