docshelp wantedknowledge :exploding_head:
Description
The systemd part from the official documentation feels a little bit incomplete.
I suggest adding a nginx approach using proxy_pass, after the systemctl enable and start step.
- Make sure your Plumber instance is running on
127.0.0.1on theExecStartparameter on the service file. - Open the
sites-enabledfolder on/etc/nginx/or the correspondent path if you're using a custom nginx installation. - Inside the
serverblock on your desired file (mine isdefault), create alocationblock with the name you want. - If your Plumber instance is running on the
6547port, put the code below inside the newly created block to make your endpoints available on the web.
location /api/ {
proxy_pass http://127.0.0.1:6547;
proxy_http_version 1.1;
}
- Restart nginx after the changes.
- On this example, your endpoints will be available on
https://example.com/api/
I don't recommend using rewrite rules, because the regex parameters can lead to unpredictable behavior when using the endpoints.