]> git.openstreetmap.org Git - nominatim.git/blob - settings/settings.php
Merge remote-tracking branch 'upstream/master'
[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_Max_Word_Frequency', '50000');
9         @define('CONST_Limit_Reindexing', true);
10
11         // Software versions
12         @define('CONST_Postgresql_Version', '9.1'); // values: 8.3, 8.4, 9.0, 9.1, 9.2
13         @define('CONST_Postgis_Version', '1.5'); // values: 1.5, 2.0
14
15         // Paths
16         @define('CONST_Path_Postgresql_Contrib', '/usr/share/postgresql/'.CONST_Postgresql_Version.'/contrib');
17         @define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-'.CONST_Postgis_Version);
18         @define('CONST_Osm2pgsql_Binary', CONST_BasePath.'/osm2pgsql/osm2pgsql');
19         @define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
20
21         // osm2pgsql settings
22         @define('CONST_Osm2pgsql_Flatnode_File', null);
23
24         // Replication settings
25         @define('CONST_Replication_Url', 'http://planet.openstreetmap.org/replication/minute');
26         @define('CONST_Replication_MaxInterval', '3600');
27         @define('CONST_Replication_Update_Interval', '60');  // How often upstream publishes diffs
28         @define('CONST_Replication_Recheck_Interval', '60'); // How long to sleep if no update found yet
29
30         // Connection buckets to rate limit people being nasty
31         @define('CONST_ConnectionBucket_MemcacheServerAddress', false);
32         @define('CONST_ConnectionBucket_MemcacheServerPort', 11211);
33         @define('CONST_ConnectionBucket_MaxBlockList', 100);
34         @define('CONST_ConnectionBucket_LeakRate', 1);
35         @define('CONST_ConnectionBucket_BlockLimit', 10);
36         @define('CONST_ConnectionBucket_WaitLimit', 6);
37         @define('CONST_ConnectionBucket_MaxSleeping', 10);
38         @define('CONST_ConnectionBucket_Cost_Reverse', 1);
39         @define('CONST_ConnectionBucket_Cost_Search', 2);
40         @define('CONST_ConnectionBucket_Cost_Details', 3);
41         @define('CONST_ConnectionBucket_Cost_Status', 1);
42
43         // Override this function to add an adjustment factor to the cost
44         // based on server load. e.g. getBlockingProcesses
45         if (!function_exists('user_busy_cost'))
46         {
47                 function user_busy_cost()
48                 {
49                         return 0;
50                 }
51         }
52
53         // Website settings
54         @define('CONST_NoAccessControl', true);
55         @define('CONST_BlockedIPs', '');
56         @define('CONST_IPBanFile', CONST_BasePath.'/settings/ip_blocks');
57         @define('CONST_WhitelistedIPs', '');
58         @define('CONST_BlockedUserAgents', '');
59         @define('CONST_BlockReverseMaxLoad', 15);
60         @define('CONST_BulkUserIPs', '');
61         @define('CONST_BlockMessage', ''); // additional info to show for blocked IPs
62
63         @define('CONST_Website_BaseURL', 'http://nominatim.openstreetmap.org/');
64         @define('CONST_Tile_Default', 'Mapnik');
65
66         @define('CONST_Default_Language', false);
67         @define('CONST_Default_Lat', 20.0);
68         @define('CONST_Default_Lon', 0.0);
69         @define('CONST_Default_Zoom', 2);
70
71         @define('CONST_Search_AreaPolygons_Enabled', true);
72         @define('CONST_Search_AreaPolygons', true);
73
74         @define('CONST_Search_BatchMode', false);
75
76         @define('CONST_Search_TryDroppedAddressTerms', false);
77         @define('CONST_Search_NameOnlySearchFrequencyThreshold', false);
78
79         // Set to zero to disable polygon output
80         @define('CONST_PolygonOutput_MaximumTypes', 1);
81
82         // Log settings
83         @define('CONST_Log_DB', true);
84         @define('CONST_Log_File', false);
85         @define('CONST_Log_File_Format', 'TODO'); // Currently hard coded
86         @define('CONST_Log_File_SearchLog', '');
87         @define('CONST_Log_File_ReverseLog', '');