[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

Need to redirect request from IIS server to old Apache Server.

I'm in the process of moving websites to a new IIS server. The old server was running IIS and a old version of Apache web server, running on port 8081. I would like to avoid installing Apache on the new server and wonder if it's possible to redirect request from the new IIS server to the old Apache service. Any thoughts? Thank you for your time.

Goal:
Requesting site www.MYWEBSITE.net/virtual directory = Load content on new IIS server.
Requesting site www.MYWEBSITE.net:8081/virtualdirectory = redirect to Apache server.

Environment:
New IIS server: Windows Server 2012 R2 (IIS 8.5)
0
Domenic DiPasquale
Asked:
Domenic DiPasquale
  • 2
1 Solution
 
Adam BrownSr Solutions ArchitectCommented:
You'll need to have a different host name for the Apache Server for that to work, but it's possible to do.
The way to do it is to create a second Virtual Site in IIS, modify the bindings on it so it responds on port 8081, then configure HTTP redirect (You have to install the HTTP Redirect feature for IIS to do this) so it redirects users to HTTP://www.myapachewebsite.net.

You can't do it with the same host name, since host names can generally only apply to a single server. But if you add a new DNS entry like legacy.mywebsite.net and point it to the old web server, that will work without too much issue. You just have to make sure the redirect rule is set to redirect relative to the url request.
0
 
Domenic DiPasqualeSystem / Network AdministratorAuthor Commented:
I seem to be on the right track, thank you for your help. By adding another virtual site, and configuring the redirect, was able to redirect to the apache server using the new host name I created in DNS. One issue I seem to be encountering is the virtual directory getting duplicated in the link. If I enter: http://www.MYWEBSITE.net:8081/directory, I'm redirected to http://apacheserver.MYWEBSITE.net:8081/directory/directory. I going to send a notice out the users that use this server let them know to just use http://www.MYWEBSITE.net:8081, or the new DNS hostname. But if you know if a quick fix or explanation to this, please let me know. Again, thank you for your time.
0
 
Adam BrownSr Solutions ArchitectCommented:
Change your redirect destination so it does not have anything after the port number. It will redirect using whatever people use for the directory, based on the root redirect.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now