How can I configure drupal to share modules between two installations on the same server?
There is a great way of accomplishing this, it's called multi-site.
See http://drupal.org/documentation/install/multi-site
and http://drupal.org/node/43816 for a start.

A great project that offers multi-site hosting is Aegir. In Aegir you can even create multiple platforms that run 1 or more sites.
See http://aegirproject.org

1 thing: you can not run multiple sites from a subdirectory if you run with Aegir/Drupal, that won't work with how Drupal is designed, but if your running on some GNU/Linux, then you might be able to symlink something together.

It's true you can use the sites/all/* folders to share modules/themes/libraries, but 1 thing is missing:
In the sites/ folder, you have to create a directory, containing the config files, files directory (etc) for every individual site that you want to run.

You could also offer multiple sites from 1 directory via an alias, but that's not what your looking for now i believe, just as an extra bonus tip. ;) Hope this helps a bit.