X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4c52777ef03738803845f9ee58d269d93bbb9c3d..07e6c5cf6923b99df15d89e587dbdf9109d0836e:/docs/admin/Setup-Nominatim-UI.md diff --git a/docs/admin/Setup-Nominatim-UI.md b/docs/admin/Setup-Nominatim-UI.md index f6068278..cab2d2ed 100644 --- a/docs/admin/Setup-Nominatim-UI.md +++ b/docs/admin/Setup-Nominatim-UI.md @@ -16,13 +16,14 @@ and run it. Grab the latest release from [nominatim-ui's Github release page](https://github.com/osm-search/nominatim-ui/releases) and unpack it. You can use `nominatim-ui-x.x.x.tar.gz` or `nominatim-ui-x.x.x.zip`. -Copy the example configuration into the right place: +Next you need to adapt the UI to your installation. Custom settings need to be +put into `dist/theme/config.theme.js`. At a minimum you need to +set `Nominatim_API_Endpoint` to point to your Nominatim installation: cd nominatim-ui - cp dist/config.example.js dist/config.js + echo "Nominatim_Config.Nominatim_API_Endpoint='https://myserver.org/nominatim/';" > dist/theme/config.theme.js -Now adapt the configuration to your needs. You need at least -to change the `Nominatim_API_Endpoint` to point to your Nominatim installation. +For the full set of available settings, have a look at `dist/config.defaults.js`. Then you can just test it locally by spinning up a webserver in the `dist` directory. For example, with Python: @@ -160,24 +161,16 @@ directory like this: # If no endpoint is given, then use search. RewriteRule ^(/|$) "search.php" - # If format-html is explicity requested, forward to the UI. + # If format-html is explicitly requested, forward to the UI. RewriteCond %{QUERY_STRING} "format=html" - RewriteRule ^([^/]+).php ui/$1.html [R,END] - # Same but .php suffix is missing. - RewriteCond %{QUERY_STRING} "format=html" - RewriteRule ^([^/]+) ui/$1.html [R,END] + RewriteRule ^([^/]+)(.php)? ui/$1.html [R,END] # If no format parameter is there then forward anything # but /reverse and /lookup to the UI. RewriteCond %{QUERY_STRING} "!format=" RewriteCond %{REQUEST_URI} "!/lookup" RewriteCond %{REQUEST_URI} "!/reverse" - RewriteRule ^([^/]+).php ui/$1.html [R,END] - # Same but .php suffix is missing. - RewriteCond %{QUERY_STRING} "!format=" - RewriteCond %{REQUEST_URI} "!/lookup" - RewriteCond %{REQUEST_URI} "!/reverse" - RewriteRule ^([^/]+) ui/$1.html [R,END] + RewriteRule ^([^/]+)(.php)? ui/$1.html [R,END] ```