简体   繁体   中英

IIS 7.5 URL rewrite based on domain name

I'm currently using IIS 7.5 to both host ASP pages and as a bridge to a tomcat server setup to host JasperReports. I've been trying to figure out how to host both of these services with 1 IP and one IIS server.

What it should do

1) When the account managers visit admin.mycompany.com , I'd like to display the ASP pages in IIS. under the domain admin.mycompany.com

2) When the account managers visits reports.mycompany.com , IIS should act as a bridge to the tomcat server and display the tomcat pages under reports.mycompany.com

Restrictions

1) Our hosting provider refuses to give us a 2nd IP, and

2) I'd prefer not to install Apache, which can easily do this with virtual host.

This question can be resolve with https://serverfault.com/questions/47537/can-iis-be-configure-to-forward-request-to-another-web-server

I copied vdboor's answer here for reference:

For IIS 7.5, Microsoft provides official modules for this!

URL Rewrite: http://www.iis.net/download/URLRewrite
Reverse proxy: http://www.iis.net/download/ApplicationRequestRouting

In the site settings, you'll get an "URL Rewrite" icon.

Open it
right click on the "inbound rules list"
Select "Add Rule(s)"
Choose "Reverse proxy"

In this dialog you can enter the hostname + port to forward to. After adding the rule, opening the edit dialog offers more customizations.

the reverse proxy template is not available at the server level. - so you need to go to the site level, and then click the 'URL rewrite' icon to be able to use this template. http://forums.iis.net/t/1183318.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM