fider
fider copied to clipboard
Subdirectory setup with Nginx?
I've been unsuccessfuly trying to set up Fider in a subfolder, e.g. http://some.domain/fider.
I tried this Nginx config
location /fider {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8941;
proxy_redirect ~^/([^/]*)$ /fider/$1;
proxy_read_timeout 240s;
}
and I put this in docker-compose.yml
:
environment:
# Public Host Name
BASE_URL: http://internal.domain/fider
However, loading http://internal.domain/fider results in a 404 page generated by Fider. curl -Ls -o /dev/null -w %{url_effective} localhost:8941
gives me http://localhost:8941/signup
, while curl -Ls -o /dev/null -w %{url_effective} localhost/fider
returns http://localhost/fider
.
It seems that the Nginx configuration is not correctly forwarding the requests to the Fider application, or Fider is not handling the subfolder setup as expected. Any help or guidance on how to correctly set up Fider in a subfolder would be appreciated.
I suspect that this might not be possible at all since there is an open feedback item regarding this: https://feedback.fider.io/posts/80/allow-hosting-without-a-subdomain
I had same issue and I made a fork to implement it: https://github.com/Kaudaj/fider/tree/subfolder-url Maybe I'll do a PR later with some tests. Anyway, I'm already using it in production, see https://fider.kaudaj.com/kjextras for example.