summaryrefslogtreecommitdiff
path: root/doc/configuration.rst
blob: dd0fb5ebb63f55071bb91b8ea9741b44839aecac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
===================
Configuration files
===================

.. contents::

SemanticScuttle uses at least two configuration files:

1. Default configuration file ``config.default.php``
2. Custom configuration file ``config.php``


The **default configuration** file contains sensible defaults for most users
that do not need to be changed to get started.

Never change it - it will get overwritten with the next update.
If you want to change values in it, copy them into your personal
``config.php`` file - updates to SemanticScuttle will not change that one.

The **custom configuration** file, ``config.php`` is created by copying the
shipped ``config.php.dist`` file and modifying the values in there.

It consists of the configuration directives that should be set on every
fresh installation.



Configuration scenarios
=======================

Simple installation
-------------------
Put your configuration file in ``data/config.php``.
If you installed SemanticScuttle's PEAR package, use::

    $ pear config-get data_dir
    /usr/share/php/data

to find the data directory location and append ``SemanticScuttle/`` to it.
In this case, the configuration file has to be in::

    /usr/share/php/data/SemanticScuttle/config.php


The configuration file may also be saved into::

    /etc/semanticscuttle/config.php


Multiple SemanticScuttle instances
----------------------------------
The files of one single SemanticScuttle installation may be shared
for several SemanticScuttle instances.

To be able to configure them differently, SemanticScuttle supports
per-host configuration files:

- ``data/config.$hostname.php``
- ``/etc/semanticscuttle/config.$hostname.php``



Configuration options
=====================
``$root`` URL
-------------
Normally, this configuration setting is detected automatically and will
work for both HTTP and HTTPS installations.

If your installation is available on **HTTP only**, then you need to configure
it.

The value is the full URL to your installation, including a trailing
slash::

    $root = "http://homepage.example.org/semanticscuttle/";

or::

    $root = "http://bookmarks.example.org/";


Common problems
===============
Searching for words with slashes "/" does not work
--------------------------------------------------
When searching for a phrase with a slash in it, like "foo/bar", you
may get a 404 error.

In that case, you need to enable AllowEncodedSlashes__ in your Apache
virtual host configuration::

    AllowEncodedSlashes NoDecode

Restart apache after changing the vhost config file.
Searching will work now.

__ http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes