Forwarding Nominatim to Apache2 #2769
cormanttech
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
So my main problem is this, I already set up the Nominatim API and Nominatim UI and connect each other. I can now access it on my localhost browser with the help of this instruction
I just changed the phyton3 to 8080 like this:
python3 -m http.server 8080
And I can finally use the Nominatim OSM and search for places:
But when I do the Apache forwarding for it to be accessed in the web from the same page of the instruction:
It succeeds in deploying it from the web but I cannot search any place and gets this error
I included the directory codes like from the Image above in /etc/apache2/conf-enabled/nominatim.conf
<Directory "/srv/nominatim/nominatim-project/website">
Options FollowSymLinks MultiViews
AddType text/html .php
DirectoryIndex search.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 explicity 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]
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]
<Directory "/srv/nominatim/nominatim-ui/dist">
DirectoryIndex search.html
Require all granted
Alias /nominatim/ui /srv/nominatim/nominatim-ui/dist
Alias /nominatim /srv/nominatim/nominatim-project/website
Where I directed the Nominatim API from this instruction:
Is there anything wrong that I did or is there something missing? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions