未找到

未找到

ubuntu VERSION="20.04.4 LTS 服务器 Aruba Cloud

你好,我已成功导入 Nominatim 数据库。开发服务器可以运行,apache2 服务器也可以运行,但仅限于本地,这意味着: curl 'localhost/nominatim/search.php?q=Manta'

给我数据回复

curl 'my-public-ip/nominatim/search.php?q=Manta'

给我

404 未找到

未找到

该服务器上未找到所请求的 URL。


Apache/2.4.41 (Ubuntu) 服务器位于 80.211.254.59 端口 80

我的 /etc/apache2/conf-available/nominatim.conf 文件是:

<Directory "srv/nominatim/website">
  Options FollowSymLinks MultiViews
  AddType text/html   .php
  DirectoryIndex search.php
  AllowOverride All
  Require all granted
</Directory>

Alias /nominatim srv/nominatim/website

我的 /etc/apache2/apache2.conf 是:

<Directory />
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

<Directory /usr/share>
        AllowOverride All
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

经过修改后我做了:

sudo a2dismod rewrite

sudo systemctl restart apache2

apache access.log 的最后几行:

83.0.66.104 - - [29/Jul/2022:12:41:10 +0000] "GET /nominatim/search.php?q=Manta HTTP/1.1" 404 492 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
83.0.66.104 - - [29/Jul/2022:12:42:02 +0000] "-" 408 0 "-" "-"
83.0.66.104 - - [29/Jul/2022:12:42:03 +0000] "GET /nominatim/search.php?q=Quito HTTP/1.1" 404 492 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"

ss -lntp 结果:

State                Recv-Q               Send-Q                             Local Address:Port                             Peer Address:Port              Process
LISTEN               0                    4096                               127.0.0.53%lo:53                                    0.0.0.0:*                  users:(("systemd-resolve",pid=710,fd=13))
LISTEN               0                    128                                      0.0.0.0:22                                    0.0.0.0:*                  users:(("sshd",pid=812,fd=3))
LISTEN               0                    511                                      0.0.0.0:1880                                  0.0.0.0:*                  users:(("node",pid=734,fd=19))
LISTEN               0                    244                                    127.0.0.1:5432                                  0.0.0.0:*                  users:(("postgres",pid=878,fd=3))
LISTEN               0                    128                                         [::]:22                                       [::]:*                  users:(("sshd",pid=812,fd=4))
LISTEN               0                    511                                            *:80                                          *:*                  users:(("apache2",pid=1758,fd=4),("apache2",pid=1747,fd=4),("apache2",pid=1746,fd=4),("apache2",pid=1745,fd=4),("apache2",pid=1744,fd=4),("apache2",pid=1743,fd=4),("apache2",pid=1742,fd=4))

我是 Linux 新手。如能提供任何帮助,我将不胜感激。谢谢

相关内容