Archive of UserLand's first discussion group, started October 5, 1998.

Re: domains vs doctree in mainresponder

Author:Christopher Short
Posted:2/23/1999; 9:54:37 PM
Topic:domains vs doctree in mainresponder
Msg #:3190 (In response to 2984)
Prev/Next:3189 / 3191

In answering his own question of How to address a website table out of a gdb which is not at top level, when you have only one server address and can't use virtual domains, Kurt J. Egger said

Assume every webserver has ONE top-level site

For each path just make an address link in the top-level site to the gdb

In fact, you don't even need a top level site. You just need a table holding the site names and the frontier address for those sites. The table can be in a GDB or in the Frontier.root.

Each entry in the table is the name of the site with the value being either the address of the site (if it's a GDB based site) or a filespec if you're serving from files.

You effectively have the "old" Doctree approach still available to you - you're using a table of addresses.

To enable mainResponder to parse the URL's correctly, point config.mainresponder.domains.default at the GDB or table which holds the names and addresses/filespecs of the sites you want to run off your server.

For me, config.mainresponder.domains.default is @["C:\\Frontier\\Guest Databases\\www\\htmlInterfaces.root"]. I chose this root since it was supplied by userland as example code for manipulating data stored elsewhere - which is what most of my sites are.

If I want to serve a site off the root of my server I simply put an entry in the htmlInterfaces root with the GDB address to the website.

eg the entry "football" with the value @["C:\\Frontier\\Guest Databases\\www\\football.root"].Football.website

allows

http://my.server.name/football/

Alternatively the value could be a filespec value - such as C:\\Footy in which case, mainResponder would serve the file based website contained in the Footy folder at the root level of the C volume.

You can point to sites anywhere - you could have a website in Frontier.root, or a static site that lives on a shared volume, and so on.

The only gotcha is that if you're serving sites out of GDB's, the GDB holding the website must be open - mainresponder won't open it for you.

Christopher


There are responses to this message:


This page was archived on 6/13/2001; 4:48:06 PM.

© Copyright 1998-2001 UserLand Software, Inc.