首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么通过Docker安装的Wikibase中的查询服务不包含添加到主wikibase存储中的内容?

为什么通过Docker安装的Wikibase中的查询服务不包含添加到主wikibase存储中的内容?
EN

Stack Overflow用户
提问于 2020-07-09 13:46:43
回答 1查看 663关注 0票数 1

我们在wikibase-码头前面安装了一个Apache服务器,以处理来自Docker的端口的SSL和代理两个vhost。

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

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

代码语言:javascript
复制
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文件中,是内部停靠名。

为了使MediaWiki搜索正常工作,我必须在LocalSettings.php.template中更新${DOLLAR}wgServer = WebRequest::detectServer(),使其具有"https://api.example.com“值。

我需要改变什么才能让它发挥作用?在docker-come.yml文件中对wikibase.svc的所有引用?还是别的什么?

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

EN

回答 1

Stack Overflow用户

发布于 2020-08-13 14:58:17

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

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

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

在我的生产机器上,我“只是”需要通过example.com复制personaldata.io。

代码语言:javascript
复制
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;
      }

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

代码语言:javascript
复制
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
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62816363

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档