0

I have setup an apache2 server which successfully serves requests to my specific IP a-la curl -i -H GET http://a.b.c.d/nominatim/lookup.php?osm_ids=N107775&format=json but requests (from the selfsame server) to localhost (a-la curl -i -H GET http://localhost/nominatim/lookup.php?osm_ids=N107775&format=json) fail with 403 errors, which furthermore aren't logged in /var/log/apache2/error.log.
Does someone have a clue or two where the disconnect might be ? My /etc/apache2/sites-enabled/osm.conf looks like:

<VirtualHost *:80>
     ServerAdmin jeremy@floob.com
     ServerName server.floob.com
     ServerAlias osm-floob.floob.com
     DocumentRoot /home/jeremy/Nominatim-3.2.0/build/website
     ErrorLog /home/jeremy/Nominatim-3.2.0/build/website/apache.error.log
     CustomLog /home/jeremy/Nominatim-3.2.0/build/website/apache.custom.log combined
</VirtualHost>


<Directory "/home/jeremy/Nominatim-3.2.0/build/website">
  Options FollowSymLinks MultiViews
  AddType text/html   .php
  DirectoryIndex search.php
  Require all granted
  Order allow,deny
  Allow from all
</Directory>

Alias /nominatim /home/jeremy/Nominatim-3.2.0/build/website

1 Answers1

0

Check in your httpd.conf (where you configure the ports which you are listening to), if you specified the IP a.b.c.d by mistake.

Documentation tells you

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 0.0.0.0:80
#Listen [::]:80

You can configure

Listen 0.0.0.0:80

or

Listen 80

to listen on port 80 with all NICs, but if you specify just one IP address, the server will not bind to localhost (127.0.0.1).