为什么我的维基库中通过Docker安装的查询服务不包含添加到主维基库的内容

  • 本文关键字:添加 包含 查询服务 Docker 安装 wikibase
  • 更新时间 :
  • 英文 :


我们安装了wikibase docker,它前面有一个Apache服务器,用于处理SSL并将两个vhosts代理到docker的端口。

  • api.example.com(至http://127.0.0.1:8181)
  • query.example.com(至http://127.0.01:8282/)

在wdqs更新程序的日志中,我看到:

org.wikidata.query.rdf.tool.rdf.Munger$BadSubjectException: Unrecognized subjects: [https://api.example.com/entity/statement/Q12-caba1d44-46d5-8598-9185-784a75e4cebb, https://api.example.com/entity/statement/Q12-4c77991e-4674-5301-75f1-5b494612b56b, https://api.example.com/wiki/Special:EntityData/Q12, https://api.example.com/entity/Q12].
Expected only sitelinks and subjects starting with http://wikibase.svc/wiki/Special:EntityData/ and [http://wikibase.svc/entity/] 

"wikibase.svc"名称用于docker-compose.yml文件,是内部docker名称。

为了使MediaWiki搜索工作,我不得不更新LocalSettings.php.template中的${DOLLAR}wgServer = WebRequest::detectServer(),使其具有值";https://api.example.com">

我需要更改什么才能使其工作?docker-compose.yml文件中对wikibase.svc的所有引用?还是别的什么?

我已经尝试为wdqs更新器容器更新WIKIBASE_HOST=,但这似乎没有帮助。

在docker compose中,您有一个在本地主机上完美工作的变量列表。当您需要在生产中部署它时,您需要更改一些变量来定义公共主机名、Ip和SSL。我确实设置了一个nginx设置来管理主机名和SSL证书。

在我的设置中,每个服务有一个主机名,我的Nginx将请求转发到同一台机器上的所有wikibase的正确端口号。

我为nginx设置的查询服务添加ssl证书,并将发送到的请求转发到端口8282https://query.example.com

在我的生产机器上;只是";需要通过personaldata.io.重新创建example.com

server {
listen 80;
server_name query.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
server_name query.example.com;
ssl on;
ssl_certificate     /etc/letsencrypt/live/query.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/query.example.com/privkey.pem;
ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers         HIGH:!aNULL:!MD5;  
access_log /var/log/nginx/query.example.com.log;
location / {
proxy_pass http://127.0.0.1:8282;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-forwarded-host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

我必须在设置中更改的变量:

QS_PUBLIC_SCHEME_HOST_AND_PORT=https://qs.example.com:443 # Public domain name and port
WIKIBASE_SCHEME=https
WIKIBASE_HOST=wiki.example.com
QS_PUBLIC_SCHEME_HOST_AND_PORT=https://qs.example.com:443
WB_PUBLIC_SCHEME_HOST_AND_PORT=https://wiki.example.com:443
WIKIBASE_SCHEME_AND_HOST=https://wiki.example.com

最新更新