Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: configuration.pike,v 1.374 2000/09/19 12:10:04 jhs Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.375 2000/09/19 12:24:37 wing Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>      inherit "basic_defvar";      mapping enabled_modules = ([]);   mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/configuration.pike:172:   function(string:int) log_function;      // The logging format used. This will probably move to the above   // mentioned module in the future.   private mapping (int:string) log_format = ([]);      // A list of priority objects   private array (Priority) pri = allocate_pris();      public mapping modules = ([]); - //! All enabled modules in this virtual server. + //! All enabled modules in this site.   //! The format is "module":{ "copies":([ num:instance, ... ]) }      public mapping (RoxenModule:string) otomod = ([]);   //! A mapping from the module objects to module names         // Caches to speed up the handling of the module search.   // They are all sorted in priority order, and created by the functions   // below.   private array (function) url_module_cache, last_module_cache;
Roxen.git/server/base_server/configuration.pike:2063:    if( catch( nm = enable_module( modname, 0, 0, 1 ) ) || (nm == 0) )    enable_module( modname, (nm=old_module), mi, 1 );    else    {    foreach ((array) old_module->error_log, [string msg, array(int) times])    nm->error_log[msg] += times;       catch( mi->update_with( nm,0 ) ); // This is sort of nessesary...       nm->report_notice(LOC_C(11, "Reloaded %s.")+"\n", mi->get_name()); -  // It's possible e.g. in the config interface that the module +  // It's possible e.g. in the admin interface that the module    // being reloaded is in use for the current request, so delay it a    // little.    //call_out (destruct, 2, old_module);    // Nope, can't do that since there are things like lookup caches    // that count on that the old module object is gone before the new    // is started.    destruct (old_module);    }       call_start_callbacks( nm, mi, modules[ (modname/"#")[0] ] );
Roxen.git/server/base_server/configuration.pike:2694:   Sql.sql sql_connect(string db)   {    if (sql_urls[db])    return sql_cache_get(sql_urls[db]);    else    return sql_cache_get(db);   }      // END SQL    - // This is the most likely URL for a virtual server. + // This is the most likely URL for a site.   private string get_my_url()   {    string s;   #if efun(gethostname)    s = (gethostname()/".")[0] + "." + query("Domain");    s -= "\n";   #else    s = "localhost";   #endif    return "http://" + s + "/";
Roxen.git/server/base_server/configuration.pike:2909:    "the cache"));          defvar("default_server", 0, DLOCALE(20, "Default site"),    TYPE_FLAG,    DLOCALE(21, "If true, this site will be selected in preference of "    "other sites when virtual hosting is used and no host "    "header is supplied, or the supplied host header does not "    "match the address of any of the other servers.") );    -  defvar("comment", "", DLOCALE(22, "Virtual server comment"), +  defvar("comment", "", DLOCALE(22, "Site comment"),    TYPE_TEXT_FIELD|VAR_MORE,    DLOCALE(23, "This text will be visible in the administration "    "interface, it can be quite useful to use as a memory helper."));    -  defvar("name", "", DLOCALE(24, "Virtual server name"), +  defvar("name", "", DLOCALE(24, "Site name"),    TYPE_STRING|VAR_MORE,    DLOCALE(25, "This is the name that will be used in the administration "    "interface. If this is left empty, the actual name of the " -  "virtual server will be used.")); +  "site will be used."));       defvar("LogFormat",    "404: $host $referer - [$cern_date] \"$method $resource $protocol\" 404 -\n"    "500: $host $referer ERROR [$cern_date] \"$method $resource $protocol\" 500 -\n"    "*: $host - - [$cern_date] \"$method $resource $protocol\" $response $length",    DLOCALE(26, "Logging: Format"),    TYPE_TEXT_FIELD|VAR_MORE,    DLOCALE(27, "What format to use for logging. The syntax is:\n"    "<pre>"    "response-code or *: Log format for that response code\n\n"
Roxen.git/server/base_server/configuration.pike:2986:    ,0, lambda(){ return !query("Log");});       defvar("NoLog", ({ }),    DLOCALE(32, "Logging: No Logging for"), TYPE_STRING_LIST|VAR_MORE,    DLOCALE(33, "Don't log requests from hosts with an IP number which "    "matches any of the patterns in this list. This also affects "    "the access counter log."),    0, lambda(){ return !query("Log");});       defvar("Domain", roxen->get_domain(), DLOCALE(34, "Domain"), TYPE_STRING, -  DLOCALE(35, "The domainname of the server. The domainname is used " +  DLOCALE(35, "The domain name of the server. The domain name is used "    "to generate default URLs, and to generate email addresses."));       defvar("MyWorldLocation", "http://"+gethostname()+"/",    DLOCALE(36, "Primary Server URL"), TYPE_URL,    DLOCALE(37, "This is the main server URL, where your start page is "    "located. Please note that you also have to configure the "    "'URLs' variable."));       defvar("URLs",    Variable.PortList( ({"http://*/"}), VAR_INITIAL,
Roxen.git/server/base_server/configuration.pike:3021:    "a location that you are not likely to use for regular "    "resources."));          // Throttling-related variables       defvar("throttle", 0,    DLOCALE(42, "Bandwidth Throttling: Server: Enabled"),TYPE_FLAG,    DLOCALE(43, "If set, per-server bandwidth throttling will be enabled. "    "It will allow you to limit the total available bandwidth for " -  "this Virtual Server.<br />Bandwidth is assigned using a Token Bucket. " +  "this site.<br />Bandwidth is assigned using a Token Bucket. "    "The principle under which it works is: for each byte we send we use a token. "    "Tokens are added to a repository at a constant rate. When there's not enough, "    "we can't transmit. When there's too many, they \"spill\" and are lost."));    //TODO: move this explanation somewhere on the website and just put a link.       defvar("throttle_fill_rate", 102400,    DLOCALE(44, "Bandwidth Throttling: Server: Average available bandwidth"),    TYPE_INT, -  DLOCALE(45, "This is the average bandwidth available to this Virtual Server in " +  DLOCALE(45, "This is the average bandwidth available to this site in "    "bytes/sec (the bucket \"fill rate\")."),    0, arent_we_throttling_server);       defvar("throttle_bucket_depth", 1024000,    DLOCALE(46, "Bandwidth Throttling: Server: Bucket Depth"), TYPE_INT,    DLOCALE(47, "This is the maximum depth of the bucket. After a long enough period "    "of inactivity, a request will get this many unthrottled bytes of data, before "    "throttling kicks back in.<br>Set equal to the Fill Rate in order not to allow "    "any data bursts. This value determines the length of the time over which the "    "bandwidth is averaged."), 0, arent_we_throttling_server);