docker
docker copied to clipboard
Wallabag behind a reverse proxy with directory path
Hi,
I'm using the docker version of wallabag and trying to get it working behind an nginx reverse proxy with the /wallabag path. I've found a few mentions of this online but no configs. Is it possible to do this?
The closest I've gotten is using the domain name variable which works for loading images (when accessing via internal IP) but accessing via the reverse proxy gives a 404 error.
Thanks,
you need to strip /wallabag from the path before forwarding to the the request to your wallabag host. https://serverfault.com/a/562850
e.g. in your nginx.conf:
location = /wallabag {
return 302 /wallabag/;
}
location /wallabag/ {
proxy_pass http://yourwallabaghost/; # note the trailing slash here, it matters!
}
Hi Does anyone know how to do this with Apache? I was using it as /wallabag on my server but now trying to dockerize it, so I need to run it as the same path.
I have this but this sends me back to `https://DOMAIN/login
ProxyPass /wallabag/ http://127.0.0.1:3080/
ProxyPassReverse /wallabag/ http://127.0.0.1:3080/
thanks
I have this but this sends me back to `https://DOMAIN/login
I have the exact same problem when trying with Caddy server:
route /wallabag/* {
uri strip_prefix /wallabag
reverse_proxy http://wallabag_server_1
}
A possible solution with nginx.conf could be another service on another port.
But It has the limitation of having to log-in to (explicit) domain/login
before access to domain
.
...
server {
listen 81;
location / {
proxy_set_header Accept-Encoding "";
proxy_pass http://localhost:80/;
sub_filter_types *;
sub_filter_once off;
sub_filter "https://your-wallabag-url-instance.com/" "/";
}
}
...
But probably for the best solution check this GitHub repository https://github.com/RrOoSsSsOo/docker-wallabag-proxy
But probably for the best solution check this GitHub repository https://github.com/RrOoSsSsOo/docker-wallabag-proxy
I couldn't figure out how to work with multiple domains, this worked perfectly for me! thanks!
I needed to access my wallabag instance both from wallabag.mydomain.tld and localhost
I just added a mount for "./fromGitHub/AppKernel.php:/var/www/wallabag/app/AppKernel.php"
can it be implemented upstream? maybe as an option?
Better yet if we could, instead, declare multiple domains
/fromGitHub/AppKernel.php:/var/www/wallabag/app/AppKernel.php"
It does not work for https://example.com/wallabag installations...
What do you mean? Have you edited the "./fromGitHub/AppKernel.php" mount to match your local copy of the modified AppKernel.php? I just noticed images load from the domain in the environment variable SYMFONY__ENV__DOMAIN_NAME, no matter which domain you access it from. I thought it worked correctly when I posted.