1

My company currently has a single Windows based web server used to serve our main web site along with some .NET applications, which are in subdirectories.

We have just completed developing a new version of our main web site in Drupal. My boss doesn't want to install PHP on our current server.

We have the ability to create a virtualized web server where PHP can be installed and we can serve our main web site. We can make it LAMP or Windows. However my boss wants all of the .NET applications to remain on the current server.

How can I configure the virtualized server running the new main site to "push" requests for the subdirectories to the original server?

2 Answers 2

3

You'll probably want to use something like Apache's reverse proxy directives. May just be as easy as:

ProxyPass /foo/ http://www.windowsbox.com/foo/
ProxyPassReverse /foo/ http://www.windowsbox.com/foo/

This will redirect all requests to the /foo/ folder on your Apache server, over to the /foo/ folder on your Windows Box. Any links on pages on the Windows box will be rewritten to work properly as well.

You may also have to load all the proxy modules that are listed at the top of that page via LoadModule.


--Christopher Karel

1
  • Thank you for the information and direction Christopher. I will look into giving that a try. Oct 6, 2010 at 14:50
1

I use SQUID to transparently rewrite using a simple PERL script doing regex specified with redirect_program.

Other Web proxies support rewriting as well. Christopher Karel identified Apache's mod_proxy and Nginx supports it. In fact, I would be surprised if a Web proxy did not support rewriting.

Be certain to understand the distinction between rewrites and redirects:

  • Rewrite - transparently proxies to a different backend server based on the URI unbeknownst to the client.
  • Redirect - directs the client to a different location as part of the HTTP protocol.
1
  • Thank you for the additional suggestion Warner. If Christopher's suggestion of using Apache's mod_proxy doesn't satisfy my needs I will give SQUID a look. Oct 6, 2010 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .