Open rrbaptista opened 1 year ago
The systemd part from the official documentation feels a little bit incomplete.
systemd
I suggest adding a nginx approach using proxy_pass, after the systemctl enable and start step.
proxy_pass
systemctl enable
start
127.0.0.1
ExecStart
sites-enabled
/etc/nginx/
server
default
location
6547
location /api/ { proxy_pass http://127.0.0.1:6547; proxy_http_version 1.1; }
https://example.com/api/
I don't recommend using rewrite rules, because the regex parameters can lead to unpredictable behavior when using the endpoints.
The
systemd
part from the official documentation feels a little bit incomplete.I suggest adding a nginx approach using
proxy_pass
, after thesystemctl enable
andstart
step.127.0.0.1
on theExecStart
parameter on the service file.sites-enabled
folder on/etc/nginx/
or the correspondent path if you're using a custom nginx installation.server
block on your desired file (mine isdefault
), create alocation
block with the name you want.6547
port, put the code below inside the newly created block to make your endpoints available on the web.https://example.com/api/
I don't recommend using rewrite rules, because the regex parameters can lead to unpredictable behavior when using the endpoints.