nginx Radicale 反向代理:403 错误

nginx Radicale 反向代理:403 错误

尝试为 Radicale 配置反向代理。网站已启动并运行,这意味着我可以连接到 WebUI,但当我尝试将其连接到我的客户端(Calcurse-caldav)时,出现了 403 错误。

这是有问题的错误 error: The server at cal.xxx.re replied with HTTP status code 403 (Forbidden) error: while trying to access https://cal.xxx.re/var/lib/radicale/collections/.

以下是设置的配置

1- /etc/radicale/config

[server]
hosts = 0.0.0.0:5232, [::]:5232

[auth]
type = htpasswd
htpasswd_filename = /etc/radicale/users
htpasswd_encryption = bcrypt

2- /etc/nginx/site-enabled/cal

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name cal.xxx.re;
    location / {
        proxy_pass http://localhost:5232/; # The / is important!
        proxy_set_header X-Script-Name /;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Remote-User $remote_user;
        proxy_set_header Host $http_host;
        proxy_pass_header Authorization;

    }

    ssl_certificate /etc/letsencrypt/live/cal.afu.re/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/cal.afu.re/privkey.pem; # managed by Certbot
}

3- 配置/calcurse/caldav/config

[General]
Binary = /usr/bin/calcurse
Hostname = cal.xxx.re
Path = /var/lib/radicale/collections/
SyncFilter = cal,todo

我确定已安装 bcrypt。我应该调查什么来解决此 403 错误?任何建议都将不胜感激!

相关内容