I wish to setup an internet site, say http://example.com to ensure that demands to http://example.com/a/<...> would operate on a RoR application and http://example.com/b/<...> would run inside a Django application.

Can you really configure Apache by doing this? How?

Will it be easier to run this type of site on Nginx rather due to the memory expenses involved?