Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer
    
Thank you for the information and direction Christopher. I will look into giving that a try. –  KayakJim Oct 6 '10 at 14:50

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.
share|improve this answer
    
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. –  KayakJim Oct 6 '10 at 14:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.