]> git.openstreetmap.org Git - nominatim.git/blob - settings/settings.php
status after hackweekend London
[nominatim.git] / settings / settings.php
1 <?php
2         if (file_exists(CONST_BasePath.'/settings/local.php')) require_once(CONST_BasePath.'/settings/local.php');
3         if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
4
5         // General settings
6         @define('CONST_Debug', false);
7         @define('CONST_Database_DSN', 'pgsql://@/nominatim'); // <driver>://<username>:<password>@<host>:<port>/<database>
8         @define('CONST_Database_Web_User', 'www-data');
9         @define('CONST_Max_Word_Frequency', '50000');
10         @define('CONST_Limit_Reindexing', true);
11
12         // Proxy settings
13         @define('CONST_HTTP_Proxy', false);
14         @define('CONST_HTTP_Proxy_Host', 'proxy.mydomain.com');
15         @define('CONST_HTTP_Proxy_Port', '3128');
16         @define('CONST_HTTP_Proxy_Login', '');
17         @define('CONST_HTTP_Proxy_Password', '');
18
19         // Software versions
20         @define('CONST_Postgresql_Version', '9.3'); // values: 9.0, ... , 9.4
21         @define('CONST_Postgis_Version', '2.1'); // values: 1.5, 2.0, 2.1
22
23         // Paths
24         @define('CONST_Path_Postgresql_Contrib', '/usr/share/postgresql/'.CONST_Postgresql_Version.'/contrib');
25         @define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-'.CONST_Postgis_Version);
26         @define('CONST_Osm2pgsql_Binary', CONST_BasePath.'/osm2pgsql/osm2pgsql');
27         @define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
28         @define('CONST_Tiger_Data_Path', CONST_BasePath.'/data/tiger');
29
30         // osm2pgsql settings
31         @define('CONST_Osm2pgsql_Flatnode_File', null);
32
33         // tablespace settings
34         // osm2pgsql caching tables (aka slim mode tables) - update only
35         @define('CONST_Tablespace_Osm2pgsql_Data', false);
36         @define('CONST_Tablespace_Osm2pgsql_Index', false);
37         // osm2pgsql output tables (aka main table) - update only
38         @define('CONST_Tablespace_Place_Data', false);
39         @define('CONST_Tablespace_Place_Index', false);
40         // address computation tables - update only
41         @define('CONST_Tablespace_Address_Data', false);
42         @define('CONST_Tablespace_Address_Index', false);
43         // search tables - needed for lookups
44         @define('CONST_Tablespace_Search_Data', false);
45         @define('CONST_Tablespace_Search_Index', false);
46         // additional data, e.g. TIGER data, type searches - needed for lookups
47         @define('CONST_Tablespace_Aux_Data', false);
48         @define('CONST_Tablespace_Aux_Index', false);
49
50         // Replication settings
51         @define('CONST_Replication_Url', 'http://planet.openstreetmap.org/replication/minute');
52         @define('CONST_Replication_MaxInterval', '3600');
53         @define('CONST_Replication_Update_Interval', '60');  // How often upstream publishes diffs
54         @define('CONST_Replication_Recheck_Interval', '60'); // How long to sleep if no update found yet
55
56         // Connection buckets to rate limit people being nasty
57         @define('CONST_ConnectionBucket_MemcacheServerAddress', false);
58         @define('CONST_ConnectionBucket_MemcacheServerPort', 11211);
59         @define('CONST_ConnectionBucket_MaxBlockList', 100);
60         @define('CONST_ConnectionBucket_LeakRate', 1);
61         @define('CONST_ConnectionBucket_BlockLimit', 10);
62         @define('CONST_ConnectionBucket_WaitLimit', 6);
63         @define('CONST_ConnectionBucket_MaxSleeping', 10);
64         @define('CONST_ConnectionBucket_Cost_Reverse', 1);
65         @define('CONST_ConnectionBucket_Cost_Search', 2);
66         @define('CONST_ConnectionBucket_Cost_Details', 3);
67         @define('CONST_ConnectionBucket_Cost_Status', 1);
68
69         // Override this function to add an adjustment factor to the cost
70         // based on server load. e.g. getBlockingProcesses
71         if (!function_exists('user_busy_cost'))
72         {
73                 function user_busy_cost()
74                 {
75                         return 0;
76                 }
77         }
78
79         // Website settings
80         @define('CONST_NoAccessControl', true);
81         @define('CONST_ClosedForIndexing', false);
82         @define('CONST_ClosedForIndexingExceptionIPs', '');
83         @define('CONST_BlockedIPs', '');
84         @define('CONST_BulkUserIPs', '');
85         @define('CONST_BlockMessage', ''); // additional info to show for blocked IPs
86
87         @define('CONST_Website_BaseURL', 'http://'.php_uname('n').'/');
88         @define('CONST_Tile_Default', 'Mapnik');
89
90         @define('CONST_Default_Language', false);
91         @define('CONST_Default_Lat', 20.0);
92         @define('CONST_Default_Lon', 0.0);
93         @define('CONST_Default_Zoom', 2);
94
95         @define('CONST_Search_AreaPolygons_Enabled', true);
96         @define('CONST_Search_AreaPolygons', true);
97
98         @define('CONST_Search_BatchMode', false);
99
100         @define('CONST_Search_TryDroppedAddressTerms', false);
101         @define('CONST_Search_NameOnlySearchFrequencyThreshold', 500);
102         // If set to true, then reverse order of queries will be tried by default.
103         // When set to false only selected languages alloow reverse search.
104         @define('CONST_Search_ReversePlanForAll', true);
105
106         @define('CONST_Places_Max_ID_count', 50); 
107
108         // Set to zero to disable polygon output
109         @define('CONST_PolygonOutput_MaximumTypes', 1);
110
111         // Log settings
112         @define('CONST_Log_DB', true);
113         @define('CONST_Log_File', false);
114         @define('CONST_Log_File_Format', 'TODO'); // Currently hard coded
115         @define('CONST_Log_File_SearchLog', '');
116         @define('CONST_Log_File_ReverseLog', '');