Proxy Pass Subdirectory in Apache Passenger with Rails App -


i have rails app (www.myapp.com) using apache passenger. virtual host configured follows:

<virtualhost *:80>   documentroot "/var/www/myapp/current/public"   railsenv production   <directory "/var/www/myapp/current/public">     options followsymlinks     allowoverride none     order allow,deny     allow   </directory>   railsbaseuri / </virtualhost> 

i have blog hosted externally on other domain, lets www.myapp-blog.com. want 301 redirect requests www.myapp.com/blog or www.myapp.com/blog/* relevant pages on www.myapp-blog.com. else should flow through rails app.

how should modify above virtual host configuration achieve this?

use apache port forwarding technique...

 <virtualhost *:80>        proxypreservehost on       proxyrequests off       servername www.myapp-blog.com       serveralias myapp-blog.com       proxypass / http://www.myapp.com/blog/       proxypassreverse / http://www.myapp.com/blog     </virtualhost>  

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -