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

Subdirectory setup with Nginx? #1130

Open
jonasjancarik opened this issue May 3, 2023 · 2 comments
Open

Subdirectory setup with Nginx? #1130

jonasjancarik opened this issue May 3, 2023 · 2 comments

Comments

@jonasjancarik
Copy link

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.

@jonasjancarik
Copy link
Author

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

@tom-combet
Copy link

tom-combet commented Jul 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants