
我已經安裝了 Nominatim 伺服器這段精彩的演練。但是,我無法讓 apache 設定正常運作。
我的預設配置指定如下:
ServerName maps.example.org
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory "/var/www/html/nominatim">
Options FollowSymLinks MultiViews
AddType text/html .php
</Directory>
在 Nominatim 中,我將 BaseUrl 指定為:
@define('CONST_Website_ @define('CONST_Website_BaseURL', '$IP/html/nominatim/')
透過以下方式設定伺服器:
./utils/setup.php --create-website /var/www/html/nominatim
Symlinks created
回報
WARNING: Unable to access the website at 46.101.185.214/html/nominatim/
You may want to update settings/local.php with @define('CONST_Website_BaseURL', 'http://[HOST]/[PATH]/');
Setup finished.
不過伺服器是可以存取的http://$IP/html/nominatim/index.php但看起來有些尷尬。
嘗試搜尋返回:
Not Found 404
我猜問題是 apache 配置,但我找不到工作星座。一個提示可能是點擊「搜尋」後的網址:
http://$IP/html/nominatim/$IP/html/nominatim/$IP/html/nominatim/search.php?q=test&viewbox=
因此我的問題是:我必須在設定檔中更改哪些內容才能使其正常工作?
非常感謝!
答案1
正如所指出的吉圖布答案很簡單:
http://
Nominatim 定義中缺少the 。它應該是這樣寫的:
@define('CONST_Website_ @define('CONST_Website_BaseURL', 'http://$IP/html/nominatim/')