My desired scenario:
- www.my-example-server.com - This one comes from server 1 (IIS 7.5)
- www.my-example-server.com/subfolder - This one should come from server 2 (IIS 7.5)
I know how to do this if it were different (sub) domains but not if it are sub folders.
My question:
Is it possible to set up such a configuration with Windows machines and/or some DNS configurations?
Update 1:
Please assume that server 1 and server 2 should have no relation at all, i.e. server 1 could be in another data center than server 2.
My goal is to cut off some high-volume applications (in "subfolder") from our primary domain which host a low-volume application.
Update 2:
Since I have to provide the existing folder structure due to legacy applications POSTing to the server (and redirecting a POST is not possible), I would prefer a solution that is transparent to the end user.
Yes, it's possible, and you don't need to act on DNS at all; in IIS, you can have a virtual directory (or a site's home directory) point to a network share.
You simply need to set the directory (or site)'s path to the share's UNC path (
\\servername\share
) instead of using a local path on the web server.Might I suggest using subdomains, rather then subfolders if you want to spread the workload to different servers.
Just make A-records for the domain.
Ex:
This would make www.mydomain.com point to 1.2.3.4 and app1.mydomain.com to 1.2.3.5.
You might need to create a forwarder in IIS (Server Manager > Roles > IIS > HTTP Redirect) to forward traffic coming from old applications.
Doing this purely in IIS will be cumbersome; of course, it's trivial in Apache.
If you can use a front-end apache proxy to point to both backend servers, this can be solved cheaply and simply; just set up proxying for the Locations you wish to push to either backend.