Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up with Nominatim Docker #231

Closed
gsg-git opened this issue Oct 9, 2023 · 3 comments
Closed

Setting up with Nominatim Docker #231

gsg-git opened this issue Oct 9, 2023 · 3 comments

Comments

@gsg-git
Copy link

gsg-git commented Oct 9, 2023

Hello my nominatim is running and the WEB search requestst is running.
But i have trouble gettiing the UI running:
The nominatim UI website is up but it cant connect to the files in http://serverip/nominatim/status.php for example.
Searches fails too.
Error fetching data from http://localhost/nominatim/search.php?q=berlin&polygon_geojson=1&format=jsonv2 (TypeError: Failed to fetch)
The apace settings:
<Directory "/nominatim/nominatim-ui/dist">
DirectoryIndex search.html
Require all granted

Alias /nominatim/ui /nominatim/nominatim-ui/dist

Alias /nominatim /nominatim/website

<Directory "/nominatim/website">
Options FollowSymLinks MultiViews
AddType text/html .php
Require all granted

RewriteEngine On

This must correspond to the URL where nominatim can be found.

RewriteBase "/nominatim/"

If no endpoint is given, then use search.

RewriteRule ^(/|$) "search.php"

If format-html is explicitly requested, forward to the UI.

RewriteCond %{QUERY_STRING} "format=html"
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]

Than you for every little help!

@mtmail
Copy link
Collaborator

mtmail commented Oct 9, 2023

Error fetching data from

Ok, that means in our browser you can see the nominatim-ui HTML frontend, that's good.

You installed Nominatim inside a docker container so the question is on which hostname (localhost vs 0.0.0.0 vs ip address) and on which port Nominatim API is listening on. The default installation https://github.com/mediagis/nominatim-docker/tree/master/4.3 uses -p 8080:8080 (https://docs.docker.com/engine/reference/commandline/run/#publish)

Does http://localhost:8080/nominatim/status.php?format=json work in your browser? What if you use 0.0.0.0 or the IP address instead?

What settings do you have in your dist/theme/config.theme.js file? (https://github.com/osm-search/nominatim-ui#configuration). I'd expect something like

Nominatim_Config.Nominatim_API_Endpoint = 'http://localhost:8080/nominatim/';

@mtmail
Copy link
Collaborator

mtmail commented Oct 9, 2023

In a previous issue you wrote "I know, but i have the system running and can search with http://192.168.19.200:8080/search.php?q=africa." so maybe the /nominatim part of the URL isn't needed.

@mtmail
Copy link
Collaborator

mtmail commented Oct 17, 2023

@mtmail mtmail closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants