Drupal installed in the web root but not at the base of the domain name If I was to have my site in the web root, for example /var/www/ but the path to my site is http://example.com/drupal, how do I configure the base path etc.

If I set my base path to http://example.com/drupal it doesn't seem to work unless the site is also in a subdirectory (ie. /var/www/drupal/).

I know I can easily just move the site to /var/www/drupal/, but I'm curious to know if it is possible to do it at /var/www/ with just drupal config.
It it impossible, unless you count .htaccess (or similar config file for your webserver) as Drupal config too. If you do, in Drupal UI change base URL to http://example.com/drupal and use mod_rewrite to remove "drupal" from URI before further processing.

Note that this will not disable direct access. Of course you can block any calls without "drupal" prefix, but it would mean nothing except Drupal can work there. So if your goal is anything more than marking it's Drupal in your URLs, it's not a way to go.

Note: your mileage may vary depending on web server used.