我们在wikibase-码头前面安装了一个Apache服务器,以处理来自Docker的端口的SSL和代理两个vhost。
在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文件中,是内部停靠名。
为了使MediaWiki搜索正常工作,我必须在LocalSettings.php.template中更新${DOLLAR}wgServer = WebRequest::detectServer(),使其具有"https://api.example.com“值。
我需要改变什么才能让它发挥作用?在docker-come.yml文件中对wikibase.svc的所有引用?还是别的什么?
我已经尝试过更新wdqs容器的WIKIBASE_HOST=,但这似乎没有帮助。
发布于 2020-08-13 14:58:17
在中,您有一个在本地主机上完美工作的变量列表。当您需要在生产中部署它时,您需要更改几个变量来定义公共主机名、Ip和SSL。我确实设置了一个nginx安装程序来管理主机名和SSL证书。
在我的设置中,每个服务有一个主机名,我的Nginx将请求转发到同一台机器上的所有wikibase的正确端口号。
我的nginx查询服务设置添加ssl证书,并将发送给https://query.example.com的请求转发到端口8282。
在我的生产机器上,我“只是”需要通过example.com复制personaldata.io。
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.comhttps://stackoverflow.com/questions/62816363
复制相似问题