Not working with reverse proxy in specific directory
Closed this issue · 2 comments
sandyboxy commented
Hello,
I've installed miniserve using the following docker-compose.yml
file:
version: "3.7"
services:
miniserve:
image: "docker.io/svenstaro/miniserve"
container_name: "miniserve"
ports:
- "8000:8000"
volumes:
- ./tmp:/tmp
#command: "-p 8889"
environment:
- MINISERVE_PATH=/tmp
- MINISERVE_PORT=8000
- MINISERVE_VERBOSE=true
- ROUTE_PREFIX=/download
and this is my nginx
conf:
server {
listen 80;
server_name mydomain.tld;
location /download {
proxy_pass http://localhost:8000;
proxy_set_header Host $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;
}
}
My intention is to serve miniserve on url http://mydomain.tld/download/
.
Thanks for any help.
svenstaro commented
Did you try MINISERVE_ROUTE_PREFIX
?
sandyboxy commented
Did you try
MINISERVE_ROUTE_PREFIX
?
Yes! It works!
I wrote ROUTE_PREFIX
instead of MINISERVE_ROUTE_PREFIX
in env variables!
Thank you very much!