为 Deluge 设置 nginx ssl 反向代理子域

为 Deluge 设置 nginx ssl 反向代理子域

是的,另一个 nginx 反向代理问题,但是大量文献似乎没有帮助,而且唯一相关帖子我发现这并没有解决我的问题。

我有一个正在运行的 Deluge Web UIhttps://example.org:8112

我已经为 my_ip 创建了一个 A DNS 记录 deluge.example.org。

因此我想设置一个 nginx 反向代理以便将子域名与 deluge 一起使用。

服务器操作系统:ArchLinux

所以我尝试了以下方法:

server {
    listen 80;
    listen [::]:80;
    # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name deluge.example.org;
    ssl on;
    ssl_certificate /etc/nginx/ssl/deluge.cert.pem;
    ssl_certificate_key /etc/nginx/ssl/deluge.key.pem;

    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    # Using list of ciphers from "Bulletproof SSL and TLS"
    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-SHA ECDHE-ECDSA-AES256-SHA ECDHE-ECDSA-AES128-SHA256 ECDHE-ECDSA-AES256-SHA384 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-SHA ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES256-SHA384 DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-SHA DHE-RSA-AES256-SHA DHE-RSA-AES128-SHA256 DHE-RSA-AES256-SHA256 EDH-RSA-DES-CBC3-SHA";

    add_header X-XSS-Protection "1; mode=block";

    location / {
        proxy_pass https://example.org:8112/;
        # proxy_set_header X-Deluge-Base "/deluge/";
    }
}

/srv/deluge/.config/deluge/ssl/deluge.cert.pem注意:我创建了一个从到的符号链接/etc/nginx/ssl/deluge.cert.pem,并且对密钥有同样的想法。

相关内容