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

Document how to use reverse proxies without Prefix URL #12

Closed
pjox opened this issue Mar 21, 2019 · 6 comments
Closed

Document how to use reverse proxies without Prefix URL #12

pjox opened this issue Mar 21, 2019 · 6 comments

Comments

@pjox
Copy link

pjox commented Mar 21, 2019

Description
I'm using filebrowser behind an Apache2 reverse proxy. Before I used filebrowser --port 8675 --scope files/ --prefixurl=/files to run filebrowser and it worked perfectly, but after updating to the latest version, and trying to run filebrowser -p 8675 -r files/ -b /files/ it stopped working.

Expected behaviour
Filebrowser serving my files behind the Apache2 reverse proxy.

What is happening instead?
I get a 503 error "Service Unavailable. The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." for the Apache2 server.

@nambrosch
Copy link

do you mean --baseurl?

@pjox
Copy link
Author

pjox commented Mar 21, 2019

Aren't -b and --baseurl the same thing?

@nambrosch
Copy link

nambrosch commented Mar 21, 2019

you're right, i don't think it exists anymore. i'm using the default root (unspecified, or ".") and a --baseurl of "/filebrowser" so my apache config looks like this:

  <Location "/filebrowser/">
    ProxyPass http://127.0.0.1:8080/filebrowser/
    ProxyPassReverse http://127.0.0.1:8080/filebrowser/
  </Location>

  ProxyPreserveHost On
  RewriteEngine On

  RewriteCond %{HTTP:Connection} Upgrade [NC]
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteRule (.*) ws://127.0.0.1:8080/$1 [P,L]

@pjox
Copy link
Author

pjox commented Mar 21, 2019

This works! Thanks! However, shouldn't it be documented somewhere for the people moving?

@marcenuc
Copy link

It is important to notice that the trailing "/" is needed.

@hacdias
Copy link
Member

hacdias commented Apr 20, 2019

Hello! Yes, there's a bug with the trailing slash being needed and I haven't had time to fix it yet, although all PRs are much more than welcome.

@pjox sorry for not documenting it. I removed it because I noticed it wasn't required since it could be achieved in other ways (such as @nambrosch mentioned).

We also accept documentation PRs 😃 if you're available to do so @pjox, it'd be more than welcome

@hacdias hacdias transferred this issue from filebrowser/filebrowser Apr 20, 2019
@hacdias hacdias changed the title Does --prefixurl has an equivalent in the latest version? Document how to use reverse proxies without Prefix URL Apr 20, 2019
@o1egl o1egl closed this as completed Jul 24, 2023
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

5 participants