Jan Mészáros reflections on technology and society

9Nov/090

Apache as proxy for IIS 7

Believe or not, a large scale AJAX application running on IIS 7 caused fragmentation issues at transport layer causing "connection timeout" error on the client side. An AJAX HTTP request passed to the IIS, which generated a proper response. The response was split to insufficient number of frames in the Windows net core: several frames were sent to client, but several frames were never send (and probably never generated).

The only practicable fix was to use Apache web server as proxy between the client and the IIS. There were no fragmentation issues and no timeout errors on the client side since applying and texting the proxy fix.

Apache rocks.

Tagged as: , No Comments
28Oct/090

Apache virtual host proxy

I had to move some virtual hosts from one server (server "A") to another server (server "B") without changing DNS records for affected domains yesterday. This can be done easily with Apache's mod_proxy module. An example configuration of the server "A" is shown below:

  1. <virtualhost *:*>
  2. ProxyPreserveHost On
  3. ProxyPassReverse / http://192.168.111.2/
  4. ServerName hostname.example.com
  5. </virtualhost>

The ProxyPreserveHost directive preserves the Host HTTP header, which is passed through to the proxied server configured by the ProxyPass directive. Virtual host's configuration on server "B" is the same, which was placed originally on server "A", e.g.:

  1. <virtualhost *:*>
  2. ServerName hostname.example.com
  3. DocumentRoot /var/www/html/hostname.example.com
  4. </virtualhost>

References:

Tagged as: No Comments