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.

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   
   </Proxy>

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

   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   
   </Location>

   <IfModule mod_deflate.c>
     AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
   </IfModule>
</VirtualHost>
share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

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.