Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement of documentation on systemd section #912

Open
rrbaptista opened this issue Jul 30, 2023 · 0 comments
Open

Improvement of documentation on systemd section #912

rrbaptista opened this issue Jul 30, 2023 · 0 comments
Labels
docs Related to documentation only help wanted Solution is well-specified enough that any community member could fix knowledge 🤯 Learn about common {plumber} problems

Comments

@rrbaptista
Copy link

rrbaptista commented Jul 30, 2023

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.

  1. Make sure your Plumber instance is running on 127.0.0.1 on the ExecStart parameter on the service file.
  2. Open the sites-enabled folder on /etc/nginx/ or the correspondent path if you're using a custom nginx installation.
  3. Inside the server block on your desired file (mine is default), create a location block with the name you want.
  4. If your Plumber instance is running on the 6547 port, 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;
}
  1. Restart nginx after the changes.
  2. 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.

@meztez meztez added docs Related to documentation only help wanted Solution is well-specified enough that any community member could fix knowledge 🤯 Learn about common {plumber} problems labels Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Related to documentation only help wanted Solution is well-specified enough that any community member could fix knowledge 🤯 Learn about common {plumber} problems
Projects
None yet
Development

No branches or pull requests

2 participants