I have a mono web application running with this virtual host below. It is running on Apache 2.2.20 / Ubuntu 11.10. I tried to add a reverse proxy inside this virtualhost so I can make asynchronous or AJAX type calls back to this same domain. My asynchronous requests would have problems in many browsers calling services that are on another domain (cross domain requests problem). I am wanting to do reverse proxy calls to this other service using http://www.whatever.com/monkey/. So, I added the directive and top directive to try to make this work. It is weird though...nothing I do seems to have any effect. I can put the exact same markup in my default website virtualhost file and it works great. What is the deal? Are some of these Mono directives causing problems?

<VirtualHost *:80>   
   ServerName www.whatever.com   
   ServerAlias whatever.com *.whatever.com    
   ServerAdmin whatever@gmail.com   
   DocumentRoot /home/myuser/web/whatever

   ProxyRequests off   
   <Proxy *>
     Order allow,deny
     Allow from all   

   <Location /monkey/>  
     ProxyPass http://www.google.com/   
     ProxyPassReverse http://www.google.com/           

   MonoServerPath www.whatever.com "/usr/bin/mod-mono-server2"   
   MonoSetEnv www.whatever.com MONO_IOMAP=all   
   MonoApplications www.whatever.com "/:/home/myuser/web/whatever"

   <Location "/">
     Allow from all
     Order allow,deny
     MonoSetServerAlias www.whatever.com
     SetHandler mono
     SetOutputFilter DEFLATE
     SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary   

   <IfModule mod_deflate.c>
     AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript

I would guess that the <Location /> SetHandler mono is being applied to <Location /monkey>. You probably need an explicit "SetHandler none" inside <Location /monkey> to remove the mono handler and let Apache do the ProxyPass* directives.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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