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

Missing subfolder path in generated links when using Apache reverse proxy #387

Closed
johnchristopher opened this issue Oct 3, 2020 · 1 comment

Comments

@johnchristopher
Copy link

johnchristopher commented Oct 3, 2020

Hello,

I am putting miniserve behind an Apache reverse proxy, on localhost and using subfolders (not subdomains).

http://localhost/miniserve/ display the miniserve root web page but links in the page are missing the subfolder path used in the host URL.

ls /home/pi/webroot
folder1
folder2

Links in miniserve page are in the form of http://localhost/folder1/ but I expect it to be in the form of http://localhost/miniserve/folder1/. Accessing directly http://localhost/miniserve/folder1/ behaves as expected.

Modifications to the default apache2.conf are as follow:

ProxyPreserveHost On
ProxyPass /miniserve/ http://127.0.0.1:8080/
ProxyPassReverse /miniserve/ http://127.0.0.1:8080/

I am running miniserve like this:

./miniserve \
  --enable-tar \
  --enable-zip \
  --color-scheme Squirrel \
  /home/pi/webroot

Is miniserve removing/ignoring path from the host when generating links or am I missing some additional apache2 settings ?

Thanks ^^

edit: I tested the apache2.config against a different webserver and it behaves according to my expectations:

pi@localhost: ~/webroot $ python -m SimpleHTTPServer 8080

edit2: Just saw this PR #208 about the issue.

@johnchristopher johnchristopher changed the title Apache subfolder reverse proxy not working, subfolder path in links removed Apache subfolder reverse proxy not working, missing subfolder path in generated links Oct 3, 2020
@johnchristopher johnchristopher changed the title Apache subfolder reverse proxy not working, missing subfolder path in generated links Missing subfolder path in generated links when using Apache reverse proxy Oct 3, 2020
@svenstaro
Copy link
Owner

Fixed by #728.

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