blrec icon indicating copy to clipboard operation
blrec copied to clipboard

如何配置nginx反向代理

Open ashesofdream opened this issue 1 year ago • 1 comments

nginx重定向到xxxx.com/path/下,然后抓包好像还是往xxxx.com/获取资源,然后就404了

ashesofdream avatar Dec 16 '23 11:12 ashesofdream

指定路径

blrec --root-path /blrec/

nginx

    location ^~ /blrec/ {
        proxy_pass http://localhost:2233;

        rewrite ^/blrec/(.*)$ /$1 break;
        proxy_redirect off;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
    }

acgnhiki avatar Dec 24 '23 16:12 acgnhiki