I am trying 2 days in the row to make working ElectronPdfService for my MediaWiki 1.39.
I have successfully installed RESTBase, tested it via curl http://mywiki.com:7231/mywiki.com/v1/page/html/TestPage2
I have installed Proton and it is running by systemd (port 3030).
And, of course, I have installed ElectronPdfService itself and made this setting: $wgElectronPdfServiceRESTbaseURL = '/api/rest_v1/page/pdf/';
as shown in the documentation.
Also, I set up Apache for proxying like this:
ProxyPass /api/rest_v1 http://localhost:7231/mywiki.com/v1
ProxyPassReverse /api/rest_v1 http://localhost:7231/mywiki.com/v1
Then the official documentation says to copy config for pdf from https://github.com/wikimedia/restbase/blob/d033c67a47f7e3a74f2629d0d1944692b83262ca/config.example.wikimedia.yaml#L40 and replace with the host:port of the wiki (mywiki.com in our example).
Ok, the provided config is in the different format than my RESTBase config.yaml.
I put those strings:
pdf:
# Cache PDF for 5 minutes since it's not purged
cache_control: s-maxage=600, max-age=600
uri: https://pdfrender-beta.wmflabs.org
secret: secret
into the section:
/{domain:mywiki.com}/{api:sys}:
x-modules:
- path: projects/proxy.yaml
options:
backend_host_template: '{{"/{domain}/sys/legacy"}}'
- spec:
paths:
/pdf:
# Cache PDF for 5 minutes since it's not purged
cache_control: s-maxage=600, max-age=600
uri: https://mywiki.com
secret: secret
But when I am trying to get curl http://mywiki.com:7231/mywiki.com/v1/page/pdf/TestPage2
it says 404 not found.
Please, share your experience and knowledge about how to install this extension and make it work.
Thank you!