# Multiple docroot

**URL:** <https://www.ruby-forum.com/t/multiple-docroot/227315>\
**Category:** NGINX\
**Created:** [March 11, 2013, 10:52am UTC](https://www.ruby-forum.com/t/multiple-docroot/227315 "2013-03-11T10:52:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ron\_ramos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/dc4da7/32.png) [@ron\_ramos](https://www.ruby-forum.com/u/ron_ramos)\
**Post date:** [March 11, 2013, 10:52am UTC](https://www.ruby-forum.com/t/multiple-docroot/227315/1 "2013-03-11T10:52:59Z")

</div>

Hi All,

Is it possible to have multiple docroot for a single domain? and will  
load  
different docroot based on condition?

our developers are currently developing our application but based on a  
new  
framework. so they would like to be able to have the legacy framework  
and  
the new framework to co-exists to ensure that the app will have less  
error  
when new framework is launched.

one sample condition is mobile, if nginx detects that it is user-agent  
is  
from mobile it will use legacy if not use new framework.  
that is just one condition, we will have other conditions as well.

is it possible on nginx?

Regards,  
Ron
