Reverse proxy in heroku to rclone serve gives 502 error

Do anyone ever got that error. Same config files works in my another vps, but not in heroku.
Is there something which I don't aware of.

Nginx logs are showing connection refused.

proxy_cache_path /home levels=1:2 keys_zone=default_cache:20m max_size=2g inactive=10000m use_temp_path=off;
proxy_cache_key "$request_uri";
proxy_cache_valid 200 302 301 2d;

server {
    listen $PORT;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;

        proxy_cache default_cache;
        proxy_buffering on;
        #proxy_cache_lock on;

        proxy_ignore_headers Expires;
        proxy_ignore_headers X-Accel-Expires;
        proxy_ignore_headers Cache-Control;
        proxy_ignore_headers Set-Cookie;

        proxy_hide_header X-Accel-Expires;
        proxy_hide_header Expires;
        proxy_hide_header Cache-Control;
        proxy_hide_header Pragma;

        add_header Kcube-Cache $upstream_cache_status;
        #add_header X-Proxy-Cache $upstream_cache_status;


What are you proxying where?

I think you need to give a lot more detail. Rclone command line, config (with no secrets), log with -vv, rclone version - basically all the things in the support template, plus details on what you are proxying and where - thanks!

1 Like

Finally, found the solution, i was not aware that even worker and web dyno also run in isolation to each other. That's why nginx which is running in web dyno could not connect with.

Thanks, I found my solution.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.