]> git.openstreetmap.org Git - nominatim.git/blob - settings/settings.php
rate limiting using memcache
[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');
8         @define('CONST_Max_Word_Frequency', '50000');
9
10         // Paths
11         @define('CONST_Postgresql_Version', '9.1');
12         @define('CONST_Path_Postgresql_Contrib', '/usr/share/postgresql/'.CONST_Postgresql_Version.'/contrib');
13         @define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-1.5');
14         @define('CONST_Osm2pgsql_Binary', CONST_BasePath.'/osm2pgsql/osm2pgsql');
15         @define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
16
17         // Connection buckets to rate limit people being nasty
18         @define('CONST_ConnectionBucket_MemcacheServerAddress', false);
19         @define('CONST_ConnectionBucket_MemcacheServerPort', 11211);
20         @define('CONST_ConnectionBucket_LeakRate', 1);
21         @define('CONST_ConnectionBucket_BlockLimit', 10);
22         @define('CONST_ConnectionBucket_WaitLimit', 6);
23         @define('CONST_ConnectionBucket_Cost_Reverse', 1);
24         @define('CONST_ConnectionBucket_Cost_Search', 2);
25         @define('CONST_ConnectionBucket_Cost_Details', 3);
26
27         if (!function_exists('user_busy_cost'))
28         {
29                 function user_busy_cost()
30                 {
31                         return 0;
32                 }
33         }
34
35         // Website settings
36         @define('CONST_ClosedForIndexing', false);
37         @define('CONST_ClosedForIndexingExceptionIPs', '');
38         @define('CONST_BlockedIPs', '');
39         @define('CONST_BulkUserIPs', '');
40
41         @define('CONST_Website_BaseURL', 'http://'.php_uname('n').'/');
42         @define('CONST_Tile_Default', 'Mapnik');
43
44         @define('CONST_Default_Language', 'xx');
45         @define('CONST_Default_Lat', 20.0);
46         @define('CONST_Default_Lon', 0.0);
47         @define('CONST_Default_Zoom', 2);
48
49         @define('CONST_Search_AreaPolygons_Enabled', true);
50         @define('CONST_Search_AreaPolygons', true);
51
52         @define('CONST_Suggestions_Enabled', false);
53
54         @define('CONST_Search_TryDroppedAddressTerms', false);
55
56         // Set to zero to disable polygon output
57         @define('CONST_PolygonOutput_MaximumTypes', 1);
58
59         // Log settings
60         @define('CONST_Log_DB', true);
61         @define('CONST_Log_File', false);
62         @define('CONST_Log_File_Format', 'TODO'); // Currently hard coded
63         @define('CONST_Log_File_SearchLog', '');
64         @define('CONST_Log_File_ReverseLog', '');