MidCOM Configuration
From OpenPSA Wiki
MidCOM core functionality can be configured per Sitegroup in the Page Element code-init. This can be done directly in Asgard or with the interface provided by midcom.admin.settings.
From midcom-config.php (version 2.5):
Contents |
[edit] Core configuration defaults.
The global variable midcom_config will hold the default values of all these options.
[edit] Site-specific configuration:
MidCOM will include the file /etc/midgard/midcom.conf which must be a regular
PHP file. You may populate the global array $GLOBALS['midcom_config_site'] in this file. It should list all options that apply to all MidCOM installations (like the Cache backend selection or the indexer host).
Example:
<?php
$GLOBALS['midcom_config_site']['cache_module_content_backend'] =
Array ('directory' => 'content/', 'driver' => 'dba');
?>
[edit] Instance-specifc configuration:
After including the site itself, MidCOM also merges the contents of the global array $GLOBALS['midcom_config_local'], which may hold configuration data for the website itself.
These settings must be set for all sites:
- midcom_root_topic_guid
You will usually include these lines somewhere before actually including MidCOM.
<?php $GLOBALS['midcom_config_local']['midcom_root_topic_guid'] = '123456789...'; ?>
[edit] Configuration setting overview:
The following configuration options are available for the MidCOM core along with their defaults, shown in alphabetical order:
[edit] Authentication configuration
- bool allow_sudo: Set this to true (the default) to allow components to request super user privileges for certain operations. This is mainly used to allow anonymous access to the system without having to store a user account everywhere.
- int auth_backend: The authentication backend to use, the "simple" backend is used as a default.
- int auth_backend_simple_timeout: The login session timeout to use for the simple authentication backend driver, this defaults to 3600 seconds (1 hour).
- int auth_frontend: The authentication frontend to use, the "form" frontend is used by default.
- string auth_sitegroup_mode: This parameter determines in which sitegroup context the MidCOM authentication should work in. If set to 'sitegrouped', the system automatically works within the current sitegroup, appending the corresponding suffix. If set to 'not-sitegrouped', no processing is done, which means the user has to specify the correct sitegroup always. The setting 'auto', which is the default, uses sitegrouped if the current host is in a sitegroup (that is, $_MIDGARD['sitegroup'] is nonzero) or non-sitegrouped mode if we are in SG0.
[edit] Cache configuration
see MidCOM Caching
[edit] Cron Service
- int cron_day_hours and int cron_day_minutes: The time of day on which daily jobs should be executed, this defaults to 00:00 which will execute daily jobs at midnight.
- int cron_hour_minute: As above, but defines the minute within an hour which executes hourly jobs. Defaults to *:30.
Always refreshing to hear a rational awsner.
[edit] Logging configuration
see also MidCOM Logging
- string log_filename: The filename to dump logging messages to, this defaults to /tmp/debug.log.
- int log_level: The logging level to use when starting up the logger, set to MIDCOM_LOG_ERROR by default. You cannot use the MIDCOM* constants when setting micdom_config_local, as they are not defined at that point. Use
- 0 for CRITICAL,
- 1 for ERROR,
- 2 for WARING,
- 3 for INFO and
- 4 for DEBUG
level logging.
- bool log_tailurl_enable: Set this to true to enable the on-site interface to the logging system. See the URL method log of midcom_application for details. Turned off by default for security reasons.
[edit] MidCOM Core configuration
- string midcom_ais_url: The fully qualified URL to the AIS system. This is used for building AIS links on-site. A trailing slash is required. It defaults to the absolute local URL '/midcom-admin/ais/'. If an absolute local URL is given to this value, the full URL of the current host is prefixed to its value, so that this configuration key can be used for Location headers. You must not use a relative URL. This key will be completed by the MidCOM Application constructor, before that, it might contain an URL which is not suitable for relcoations.
- string midcom_prefix: Any prefix you might have on your site. Defaults to none.
- GUID midcom_root_topic_guid: This is the GUID of the topic we should handle. This must be set on a per-site basis, otherwise MidCOM won't start up.
- string midcom_site_url: The fully qualified URL to the Website, used in AIS to build on-site links. A trailing slash is required. It defaults to '/'. If an absolute local URL is given to this value, the full URL of the current host is prefixed to its value, so that this configuration key can be used for Location headers. You must not use a relative URL. This key will be completed by the MidCOM Application constructor, before that, it might contain an URL which is not suitable for relcoations.
[edit] Utility Programs
The various paths set here lead to the utility programs required by MidCOM, both mandatory and optional applications are listed here. To indicate that a certain application is unavailable, set it to null. It is recommended to set this in the /etc/midgard/midcom.conf file. The defaults assume that the files are within the $PATH of the Apache user and should be sufficient in most cases. Package mainatainers are encouraged to make the paths explicit.
- string utility_imagemagick_base: The base path of the ImageMagick executables, the tools mogrify, identify and convert are needed for almost all kinds of image operations in MidCOM and have to be present therefore. The path entered here requires a trailing slash.
- string utility_jpegtran: JPEGTran is used to do losless rotation of JPEG images for automatic EXIF rotation in n.s.photos for example. If unavailable, there is an automatic fallback to imagemagick.
- string utility_unzip: The unzip utility, used for bulk uploads.
- string utility_gzip: The gzip utility, used for bulk uploads.
- string utility_tar: The tar utility, used for bulk uploads.
- string utility_jhead: The jhead utility, used as a fallback to read EXIF information if the PHP implementation (pre 4.3) is buggy.
- string utility_find: The Find utility is used for bulk upload preprocessing and the like.
- string utility_file: Utility to identify all kinds of uploaded files.
- string utility_catdoc: Transforms Word Documents into text for indexing.
- string utility_pdftotext: Transforms PDF Documents into text for indexing.
- string utility_unrtf: Transforms RTF Documents into text files for indexing.
- string utility_diff: The diff utility. Used to create diffs.
- string utility_rcs: The rcs revision controlsystem is needed for versioning.
[edit] Visibility settings (NAP)
Note: It is not recommended to activate these two options at this time, as the metadata framework is not yet rewritten to a more efficient MgdSchema driven solution. With larger sites, having Metadata active can lead to serious performance impacts.
- bool show_hidden_objects: This flag indicates wether objects that are invisible either by explicit hiding or by their scheduling should be shown anyway. This defaults to true at this time (due to Metadata performance problems).
- bool show_unapproved_objects: This flag indicates wether objects should be shown even if they are not approved. This defaults to true.
