maps.libre.is is working

This commit is contained in:
Jeff Moe 2024-09-15 08:12:35 -06:00
parent 9d20e9830a
commit bef7e13aa7
2 changed files with 114 additions and 13 deletions

View file

@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Libre Developers Documentation 0\n" "Project-Id-Version: Libre Developers Documentation 0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-14 12:01-0600\n" "POT-Creation-Date: 2024-09-15 08:12-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n" "Language: en\n"
@ -160,42 +160,77 @@ msgstr ""
msgid "Download some files:" msgid "Download some files:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:202 #: ../../../_source/maps-libre-is.rst:210
msgid "Set up for web:" msgid "Set up for web:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:209 #: ../../../_source/maps-libre-is.rst:217
msgid "Create systemd files:" msgid "Create systemd files:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:225 #: ../../../_source/maps-libre-is.rst:233
msgid "Another systemd file:" msgid "Another systemd file:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:252 #: ../../../_source/maps-libre-is.rst:260
msgid "Start Nominatim systemd:" msgid "Start Nominatim systemd:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:262 #: ../../../_source/maps-libre-is.rst:270
msgid "Nominatim Apache" msgid "Nominatim Apache"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:263 #: ../../../_source/maps-libre-is.rst:271
msgid "Thusly." msgid "Thusly."
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:265 #: ../../../_source/maps-libre-is.rst:273
msgid "As user nominatim:" msgid "As user nominatim:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:271 #: ../../../_source/maps-libre-is.rst:279
msgid "As sudo user:" msgid "As sudo user:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:285 #: ../../../_source/maps-libre-is.rst:293
msgid "Then connect to this to test:" msgid "Then connect to this to test:"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:287 #: ../../../_source/maps-libre-is.rst:295
msgid "`<https://maps.libre.is/status>`_" msgid "`<https://maps.libre.is/status>`_"
msgstr "" msgstr ""
#: ../../../_source/maps-libre-is.rst:299
msgid "Nominatim UI"
msgstr ""
#: ../../../_source/maps-libre-is.rst:300
msgid "Nominatim is just the API. It needs a nice front-end too."
msgstr ""
#: ../../../_source/maps-libre-is.rst:302
msgid ""
"`<https://nominatim.org/release-docs/latest/admin/Setup-Nominatim-UI/>`_"
msgstr ""
#: ../../../_source/maps-libre-is.rst:304
msgid "`<https://github.com/osm-search/nominatim-ui>`_"
msgstr ""
#: ../../../_source/maps-libre-is.rst:306
msgid "Grab the latest release from here:"
msgstr ""
#: ../../../_source/maps-libre-is.rst:308
msgid "`<https://github.com/osm-search/nominatim-ui/releases>`_"
msgstr ""
#: ../../../_source/maps-libre-is.rst:316
msgid ""
"Need to modify Apache again. Remove this file: /etc/apache2/conf-available/"
"nominatim.conf"
msgstr ""
#: ../../../_source/maps-libre-is.rst:319
msgid "Final apache config:"
msgstr ""

View file

@ -203,11 +203,10 @@ Download some files:
wget https://www.osmtoday.com/north_america/us.pbf wget https://www.osmtoday.com/north_america/us.pbf
# Uh, use venv # Uh, use venv
source /srv/nominatim/nominatim-venv/bin/activate source /srv/nominatim/nominatim-venv/bin/activate
# Now import it # Now import it (takes 15 hours)
nominatim import --osm-file us.pbf 2>&1 | tee setup.log nominatim import --osm-file us.pbf 2>&1 | tee setup.log
Set up for web: Set up for web:
.. code-block:: .. code-block::
@ -296,3 +295,70 @@ Then connect to this to test:
`<https://maps.libre.is/status>`_ `<https://maps.libre.is/status>`_
Nominatim UI
============
Nominatim is just the API. It needs a nice front-end too.
`<https://nominatim.org/release-docs/latest/admin/Setup-Nominatim-UI/>`_
`<https://github.com/osm-search/nominatim-ui>`_
Grab the latest release from here:
`<https://github.com/osm-search/nominatim-ui/releases>`_
.. code-block:: sh
wget https://github.com/osm-search/nominatim-ui/releases/download/v3.5.3/nominatim-ui-3.5.3.tar.gz
tar xf nominatim-ui-3.5.3.tar.gz
cp -a nominatim-ui-3.5.3/dist/* /var/www/html/maps-libre-is/
Need to modify Apache again. Remove this file:
/etc/apache2/conf-available/nominatim.conf
Final apache config:
.. code-block:: apacheconf
<VirtualHost maps.libre.is:80>
ServerName maps.libre.is
ServerAlias map.libre.is
ServerAdmin webmaster@libre.is
DocumentRoot /var/www/html/maps-libre-is
ErrorLog ${APACHE_LOG_DIR}/error-libre-maps-is.log
CustomLog ${APACHE_LOG_DIR}/access-libre-maps-is.log combined
RewriteEngine on
ReWriteCond %{HTTPS} off
RewriteCond %{SERVER_NAME} =map.libre.is
RewriteRule ^ https://maps.libre.is%{REQUEST_URI} [END,NE,R=permanent]
ReWriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{SERVER_NAME} =maps.libre.is
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost maps.libre.is:443>
ServerName maps.libre.is
ServerAlias map.libre.is
ServerAdmin webmaster@libre.is
DocumentRoot /var/www/html/maps-libre-is
ErrorLog ${APACHE_LOG_DIR}/error-ssl-libre-maps-is.log
CustomLog ${APACHE_LOG_DIR}/access-ssl-libre-maps-is.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =map.libre.is
RewriteRule ^ https://maps.libre.is%{REQUEST_URI} [END,NE,R=permanent]
ReWriteCond %{HTTPS} off [OR]
ReWriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
ReWriteRule ^(.*)$ https://%1$1 [L,R=301]
<Directory /var/www/html/maps-libre-is>
DirectoryIndex search.html
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ProxyPass /nominatim "unix:/run/nominatim.sock|http://maps.libre.is/"
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/maps.libre.is/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/maps.libre.is/privkey.pem
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet