嘗試在 qbittorrent Web UI 上設定 https

嘗試在 qbittorrent Web UI 上設定 https

所以我在 Ubnutu 18.04 伺服器上執行 qbittorrent,使用 webui 進行互動。當我跟隨本教程一旦我進入輸入金鑰和憑證並點擊「儲存」的階段,Web UI 將不再加載,我可以恢復的唯一方法是刪除 .conf 檔案並重新啟動服務。任何人都知道我做錯了什麼謝謝。

答案1

試試這個,它對我有用。

使用透過 certbot 要求的 Let's Encrypt 憑證(請參閱這裡)。

certbot certonly --standalone --preferred-challenges http --must-staple --redirect --hsts --uir --staple-ocsp --rsa-key-size 4096 --domain subdomain.doman.com

證書儲存在這裡:

root@server:/etc/letsencrypt/live/subdomain.doman.com# ll
total 12
drwxr-xr-x 2 root root 4096 Mar 20 14:10 ./
drwx------ 3 root root 4096 Mar 20 14:10 ../
-rw-r--r-- 1 root root  692 Mar 20 14:10 README
lrwxrwxrwx 1 root root   53 Mar 20 14:10 cert.pem -> ../../archive/subdomain.doman.com/cert1.pem
lrwxrwxrwx 1 root root   54 Mar 20 14:10 chain.pem -> ../../archive/subdomain.doman.com/chain1.pem
lrwxrwxrwx 1 root root   58 Mar 20 14:10 fullchain.pem -> ../../archive/subdomain.doman.com/fullchain1.pem
lrwxrwxrwx 1 root root   56 Mar 20 14:10 privkey.pem -> ../../archive/subdomain.doman.com/privkey1.pe

我必須將“cert.pem”和“privkey.pem”檔案複製到以下路徑(qbtuser 是運行 qBittorrent 守護程式的使用者)

mkdir /home/qbtuser/.config/qBittorrent/ssl
cd /home/qbtuser/.config/qBittorrent/ssl
chmod 0700 *.pem
chown qbtuser:qbtuser *.pem

root@server:/home/qbtuser/.config/qBittorrent/ssl# ll
total 16
drwxrwxr-x 2 qbtuser qbtuser 4096 Mar 20 15:52 ./
drwxrwxr-x 4 qbtuser qbtuser 4096 Mar 20 16:34 ../
-rwx------ 1 qbtuser qbtuser 2321 Mar 20 15:59 cert.pem*
-rwx------ 1 qbtuser qbtuser 3268 Mar 20 15:59 privkey.pem*

故障排除:

journalctl -f -u qbittorrent.service

systemctl daemon-reload && systemctl restart qbittorrent

相關內容