doc/book/en/C040-instance-config.en.txt
branchtls-sprint
changeset 1714 a721966779be
parent 1499 fd8751c3f3ee
child 1715 cba9f175da2d
equal deleted inserted replaced
1499:fd8751c3f3ee 1714:a721966779be
     1 .. -*- coding: utf-8 -*-
       
     2 
       
     3 
       
     4 Configure an instance
       
     5 =====================
       
     6 
       
     7 While creating an instance, a configuration file is generated in::
       
     8 
       
     9     $ (CW_REGISTRY) / <instance> / <configuration name>.conf
       
    10 
       
    11 For example::
       
    12 
       
    13     /etc/cubicweb.d/JPL/all-in-one.conf
       
    14 
       
    15 It is a simple text file format INI. In the following description,
       
    16 each option name is prefixed with its own section and followed by its
       
    17 default value if necessary, e.g. "`<section>.<option>` [value]."
       
    18 
       
    19 
       
    20 Configuring the Web server
       
    21 --------------------------
       
    22 :`web.auth-model` [cookie]:
       
    23     authentication mode, cookie or http
       
    24 :`web.realm`:
       
    25     realm of the application in http authentication mode
       
    26 :`web.http-session-time` [0]:
       
    27     period of inactivity of an HTTP session before it closes automatically.
       
    28     Duration in seconds, 0 meaning no expiration (or more exactly at the
       
    29     closing of the browser client)
       
    30 
       
    31 :`main.anonymous-user`, `main.anonymous-password`:
       
    32     login and password to use to connect to the RQL server with
       
    33     HTTP anonymous connection. CWUser account should exist.
       
    34 
       
    35 :`main.base-url`:
       
    36     url base site to be used to generate the urls of web pages
       
    37 
       
    38 Https configuration
       
    39 ```````````````````
       
    40 It is possible to make a site accessible for anonymous http connections
       
    41 and https for authenticated users. This requires to
       
    42 use apache (for example) for redirection and the variable `main.https-url`
       
    43 of configuration file.
       
    44 
       
    45 :Example:
       
    46 
       
    47    For an apache redirection of a site accessible via `http://localhost/demo`
       
    48    and `https://localhost/demo` and actually running on port 8080, it
       
    49    takes to the http:::
       
    50 
       
    51      RewriteCond %(REQUEST_URI) ^/demo
       
    52      RewriteRule ^/demo$ /demo/
       
    53      RewriteRule ^/demo/(.*) http://127.0.0.1:8080/$1 [L,P]
       
    54   
       
    55    and for the https:::
       
    56 
       
    57      RewriteCond %(REQUEST_URI) ^/ demo
       
    58      RewriteRule ^/demo$/demo/
       
    59      RewriteRule ^/demo/(.*) http://127.0.0.1:8080/https/$1 [L,P]
       
    60 
       
    61 
       
    62    and we will file in the all-in-one.conf of the instance:::
       
    63 
       
    64      base-url = http://localhost/demo
       
    65      https-url = `https://localhost/demo`
       
    66 
       
    67 Setting up the web
       
    68 --------------------------------
       
    69 :`web.embed-allowed`:
       
    70     regular expression matching sites which could be "embedded" in
       
    71     the site (controllers 'embed')
       
    72 :`web.submit-url`:
       
    73     url where the bugs encountered in the application can be mailed to
       
    74 
       
    75 
       
    76 RQL server configuration
       
    77 ------------------------
       
    78 :`main.host`:
       
    79     host name if it can not be detected correctly
       
    80 :`main.pid-file`:
       
    81     file where will be written the server pid
       
    82 :`main.uid`:
       
    83     user account to use for launching the server when it is
       
    84     root launched by init
       
    85 :`main.session-time [30*60]`:
       
    86     timeout of a RQL session
       
    87 :`main.query-log-file`:
       
    88     file where all requests RQL executed by the server are written
       
    89 
       
    90 
       
    91 Pyro configuration for the instance
       
    92 -----------------------------------
       
    93 Web server side:
       
    94 
       
    95 :`pyro-client.pyro-application-id`:
       
    96     pyro identifier of RQL server (e.g. the instance name)
       
    97 
       
    98 RQL server side:
       
    99 
       
   100 :`pyro-server.pyro-port`:
       
   101     pyro port number. If none is specified, a port is assigned
       
   102     automatically.
       
   103 
       
   104 RQL and web servers side:
       
   105 
       
   106 :`pyro-name-server.pyro-ns-host`:
       
   107     hostname hosting pyro server name. If no value is
       
   108     specified, it is located by a request from broadcast
       
   109 :`pyro-name-server.pyro-ns-group` [cubicweb]:
       
   110     pyro group in which to save the application
       
   111 
       
   112 
       
   113 Configuring e-mail
       
   114 ------------------
       
   115 RQL and web server side:
       
   116 
       
   117 :`email.mangle-mails [no]`:
       
   118     indicates whether the email addresses must be displayed as is or
       
   119     transformed
       
   120 
       
   121 RQL server side:
       
   122 
       
   123 :`email.smtp-host [mail]`:
       
   124     hostname hosting the SMTP server to use for outgoing mail
       
   125 :`email.smtp-port [25]`:
       
   126     SMTP server port to use for outgoing mail
       
   127 :`email.sender-name`:
       
   128     name to use for outgoing mail of the application
       
   129 :`email.sender-addr`:
       
   130     address for outgoing mail of the application
       
   131 :`email.default dest-addrs`:
       
   132     destination addresses by default, if used by the configuration of the
       
   133     dissemination of the model (separated by commas)
       
   134 :`email.supervising-addrs`:
       
   135     destination addresses of e-mails of supervision (separated by
       
   136     commas)
       
   137 
       
   138 
       
   139 Configuring logging
       
   140 -------------------
       
   141 :`main.log-threshold`:
       
   142     level of filtering messages (DEBUG, INFO, WARNING, ERROR)
       
   143 :`main.log-file`:
       
   144     file to write messages
       
   145 
       
   146 
       
   147 Configuring Eproperties
       
   148 -----------------------
       
   149 Other configuration settings are in the form of entities `CWProperty`
       
   150 in the database. It must be edited via the web interface or by
       
   151 RQL queries.
       
   152 
       
   153 :`ui.encoding`:
       
   154     Character encoding to use for the web
       
   155 :`navigation.short-line-size`: # XXX should be in ui
       
   156     number of characters for "short" display
       
   157 :`navigation.page-size`:
       
   158     maximum number of entities to show per results page
       
   159 :`navigation.related-limit`:
       
   160     number of related entities to show up on primary entity view
       
   161 :`navigation.combobox-limit`:
       
   162     number of entities unrelated to show up on the drop-down lists of
       
   163     the sight on an editing entity view