NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,

I've set up Nominatim on an Ubuntu server using the installation documentation. However, it is unclear to me how I actually access this server to geocode. For example, if I wanted to use the python geocoder package (https://geocoder.readthedocs.io/providers/OpenStreetMap.html), how do I actually access my version of Nominatim? As in, what is the URL I should be directing my search towards? Any help or guideance would be appreciated.

asked 09 Jun '20, 15:32

bsilver's gravatar image

bsilver
21224
accept rate: 0%


It depends a bit how the webserver got setup. With http://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-20/#setting-up-the-apache-webserver it's likely

http://server-ip-address/nominatim/search.php

and you should be able to open that in a browser. For the python module it should be

http://server-ip-address/nominatim/

because it adds /search.php or /reverse.php itself.

permanent link

answered 09 Jun '20, 15:38

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Thanks for this clear answer. The browser address does load a very simple page.

Doing 'http://[server-ip]/nominatim' gets me the same "url does not exist" error that I'd been getting. However, when I add 'search.php' to the end of it, I get a "500 server error," but I'm not sure what could be going wrong. Any ideas of a common reason for this problem?

(09 Jun '20, 16:50) bsilver

The webserver logfile should show the full error. On Ubuntu look into /var/log/apache2/error.log There is also http://[server-ip]/nominatim/status.php which might have pointers and the cd build; ./utils/check_nominatim_finished.php script.

(09 Jun '20, 16:52) mtmail

Okay, so the error.log file says "Symbolic link not allowed or link target not accessible" and the status.php page says Database query failed. I also don't see a check_nominatim_finished script in utils... But I'm pretty sure Nominatim installed correctly and the map extract I used (just north america) finished importing

(09 Jun '20, 19:01) bsilver

I mixed up the name, it's check_import_finished.php. It's only a couple of months old, maybe you installed an older version. In your Apache configuration /etc/apache2/conf-available/nominatim.conf look for the <Directory and alias lines and check if those paths exist. Maybe a simple typo.

(09 Jun '20, 19:05) mtmail

Oh strange, that file isn't there either, so I must have installed an older version (although I started this process last week). I'd been playing around with the nominatim.conf file earlier - the director line is "/srv/nominatim/build/website" and the alias line is the same with the alias as /nominatim. Seems correct? (/srv/nominatim is where my build directory is)

Thanks for your help with this - I feel like I'm really close!

(09 Jun '20, 19:18) bsilver

Looks alright. I have mine in /srv/nominatim/Nominatim/build/website but that depends on which installation instructions you used.

(09 Jun '20, 19:20) mtmail

I also tried changing my baseURl in local.php from /nominatim to http://[my-ip]/nominatim/ but that didn't help either. Any other ideas?

(09 Jun '20, 19:29) bsilver

You can use cd build; ./utils/query.php to run test queries, which would show if the database imported fine (I'm sure it did). The CONST_Website_BaseURL in local.php is used to create links on the website, that's only relevant once the page is displayed. Check if system users (e.g. the user that starts the Apache webserver) can access the directory: chmod a+x /srv/nominatim/ (http://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-20/#creating-dedicated-user-accounts) Maybe you need to add --recursive.

(10 Jun '20, 01:56) mtmail
showing 5 of 8 show 3 more comments

Hi @mtmail, due to a bug in the website I am unable to view your most recent comment with new troubleshooting suggestions. Are you able to view it and repost it as an answer?

permanent link

answered 12 Jun '20, 14:25

bsilver's gravatar image

bsilver
21224
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×78
×39

question asked: 09 Jun '20, 15:32

question was seen: 4,240 times

last updated: 12 Jun '20, 14:25

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum