I can't get a separate reverse proxy work

No way. I’ve read all documentation and most of the posts in forum related to this (frequent) problem, but I can’t get my reverse proxy works with Seafile.

I’m using Seafile Pro because I’m thinking to finally use on my institution, if I get to manage this problem.

My setup is created with a docker compose and, while use the IP:port to access it works incredibly fast and reliable.

However, I can’t get to properly setup my separate reverse proxy to completely works with Seafile.

I’m using an instance of the linuxserver.io SWAG in a separate server and the proxy works using a subdomain, but I can’t upload files via web and user’s avatar doesn’t appear (in dev tools there is an error about the access to /media folder).

I think it is clear that the big problem could be access the /media folder from an external server but, I’m not sure that this could be the only problem.

Any suggestion?

Hi, don’t try to access media/any folder, just redirect and let the seafile container internal nginx handle that. Nginx config I used when I was running a swag instance:

server {
    listen       80;
    server_name  my.domain;
    rewrite ^ https://$http_host$request_uri? permanent;

server {
    listen 443 ssl;
    server_name my.domain;

    include /config/nginx/ssl.conf;

    location / {
        proxy_pass         http://local.server:port;
        include /config/nginx/proxy.conf;

What I get with your config is this on my browser:

#Bad Request
Contradictory scheme headers

Ok finally took some time on this, found some hint here: https://github.com/haiwen/seafile-docker/issues/226

So I managed to make things work by editing the nginx/proxy.conf file (in the swag volume):

proxy_set_header X-Forwarded-Ssl off; # was set to "on" initially

Note that I don’t know exactly what this implies (security, …).

1 Like

It sounds like you have done a lot of research and are very close to getting your reverse proxy to work with Seafile. I would suggest double-checking all of your configuration settings to make sure everything is set up properly. Additionally, you may want to make sure that the web server in your Seafile instance is properly configured to accept requests from external sources. It may also be beneficial to check any logs or error messages to see if there is any other issue that is preventing the reverse proxy from working properly. Good luck!