简体   繁体   English

Nginx反向代理背后的Qtorrent Web GUI无法加载登录网页CSS

[英]Qtorrent web GUI behind Nginx reverse proxy not loading login webpage css

Torrent client, qtorrent, has web GUI. 洪流客户端qtorrent具有Web GUI。

Torrent client on one server with unique ip address. 一台服务器上的Torrent客户端具有唯一的IP地址。 Nginx reverse proxy setup with unique ip address. 具有唯一IP地址的Nginx反向代理设置。

Have setup Nginx reverse proxy to point subdomain address internal ip address with specific port (traffic HTTPS via letsencrypt). 设置Nginx反向代理以指向具有特定端口的子域地址内部ip地址(通过letencrypt进行流量HTTPS)。

Can load Torrent Client GUI login page, but no page formatting (images provided below). 可以加载Torrent Client GUI登录页面,但不能加载页面格式(下面提供的图像)。

enter image description here 在此处输入图片说明

enter image description here 在此处输入图片说明

Can access Torrent Client GUI when on local network, via local ip address:port. 在本地网络上时,可以通过本地ip地址:端口访问Torrent Client GUI。

When login details are entered in site (that is accessed via domain address sub.example.com), a blank white web page is loaded and the web address changes to " https://www.sub.example.com/?username=UNameExample&password=PASSWORDExample " 在站点中输入登录详细信息(可通过域名sub.example.com访问)时,将加载空白的白色网页,并且该网址将更改为“ https://www.sub.example.com/?username= UNameExample&password = PASSWORDExample

Any advise on where to confirm or check configurations. 关于在哪里确认或检查配置的任何建议。

Below worked for Nginx Reverse Proxy setup for qtorrent. 下面为qtorrent的Nginx反向代理设置工作。

Original found solution here . 原来在这里找到解决方案。

                #
            #Code below is for SSL
            #
            server {
                listen 80;
                listen [::]:80;
                server_name bittorrent.example.com www.bittorrent.example.com;

                include snippets/letsencrypt.conf;
                return 301 https://$host$request_uri;
            }


            server {
               listen 443 ssl http2;
               server_name bittorrent.example.com;

               ssl_certificate /etc/letsencrypt/live/bittorrent.example.com/fullchain.pem;
               ssl_certificate_key /etc/letsencrypt/live/bittorrent.example.com/privkey.pem;
               ssl_trusted_certificate /etc/letsencrypt/live/bittorrent.example.com/chain.pem;
               include snippets/ssl.conf;
               include snippets/letsencrypt.conf;

               return 301 https://www.bittorrent.example.com$request_uri;
            }

            server {
               listen 443 ssl http2;
               server_name www.bittorrent.example.com;

               ssl_certificate /etc/letsencrypt/live/bittorrent.example.com/fullchain.pem;
               ssl_certificate_key /etc/letsencrypt/live/bittorrent.example.com/privkey.pem;
               ssl_trusted_certificate /etc/letsencrypt/live/bittorrent.example.com/chain.pem;
               include snippets/ssl.conf;
               include snippets/letsencrypt.conf;

               location / {
                proxy_pass http://192.168.0.10:9091/;
                proxy_set_header        X-Forwarded-Host        $server_name:$server_port;
                proxy_hide_header       Referer;
                proxy_hide_header       Origin;
                proxy_set_header        Referer                 '';
                proxy_set_header        Origin                  '';
                add_header              X-Frame-Options         "SAMEORIGIN";
               }
            }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM