2 * Copyright (c) 1994, 1995. Netscape Communications Corporation. All
5 * Use of this software is governed by the terms of the license agreement for
6 * the Netscape Communications or Netscape Comemrce Server between the
11 /* ------------------------------------------------------------------------ */
15 * conf.h: Deals with the server configuration file.
17 * Object configuration is an entirely different matter. This deals with
18 * things like what port the server runs on, how many children it spawns,
19 * and other server-related issues. Information related configuration is
20 * handled by the object conf.
30 #include <nt/ntconf.h>
34 #include "frame/objset.h"
35 #include "base/daemon.h" /* daemon struct */
37 #include <pwd.h> /* struct passwd */
39 /* ------------------------------ Constants ------------------------------- */
42 /* The longest line in the configuration file */
43 #define CONF_MAXLEN 16384
49 #if defined(DAEMON_ANY)
51 #define DEFAULT_PORT 8080
53 #define DEFAULT_PORT 80
57 #if defined(DAEMON_UNIX_POOL) || defined(DAEMON_UNIX_MOBRULE)
58 #define DEFAULT_POOL_MAX 50
62 /* ------------------------------- Globals -------------------------------- */
68 * These server parameters are made global because they really don't
69 * belong anywhere else.
72 #if defined(DAEMON_ANY)
74 #include <sys/types.h>
76 /* What port we listen to */
79 /* What address to bind to */
83 extern struct passwd
*userpw
;
85 /* Directory to chroot to */
88 /* Where to log our pid to */
91 #if defined(DAEMON_UNIX_POOL) || defined(DAEMON_UNIX_MOBRULE)
92 /* The maximum number of processes to keep in the pool */
94 /* The minimum number of processes to keep in the pool */
96 /* The maximum number of requests each process should handle. -1=default */
101 extern char *secure_keyfn
;
102 extern char *secure_certfn
;
103 extern char *secure_dongle
;
104 extern int security_active
;
105 extern int secure_auth
;
106 extern int security_session_timeout
;
111 /* The server's hostname as should be reported in self-ref URLs */
112 extern char *server_hostname
;
114 /* The main object from which all are derived */
115 extern char *root_object
;
117 /* The object set the administrator has asked us to load */
118 extern httpd_objset
*std_os
;
120 /* The main error log, where all errors are logged */
121 extern char *master_error_log
;
123 /* The e-mail address of someone to mail upon catastrophic error */
124 extern char *admin_email
;
129 /* ------------------------------ Prototypes ------------------------------ */
133 * conf_init reads the given configuration file and sets any non-default
134 * parameters to their given setting.
137 char *conf_init(char *cfn
);
140 * conf_terminate frees any data the conf routines may be holding.
143 void conf_terminate();
147 * conf_vars2daemon transfers these globals to a daemon structure
149 void conf_vars2daemon(daemon_s
*d
);