I am finally able to answer my own question.
Let’s call my subdirectory /myapp. I used the “ln” command to symlink that subdirectory to my rails “public” folder.
I added this line to config/environments/production.rb:
ActionController::AbstractRequest.relative_url_root = “/myapp”
Then I had to fix anything in my application that referred to the root url as “/”. For example in config/routes.rb:
OLD: map.login ‘/login’, :controller => ‘sessions’, :action => 'new’
NEW: map.login ‘login’, :controller => ‘sessions’, :action => ‘new’
If you have redirects to “/”, you should be able to replace those with redirect_to(root_path). Refer to the output of “rake routes” for help.
The nice thing is that my development webrick server works just the same as it always did.
I’m on Rails 2.0.2