qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.85k stars 3.87k forks source link

Redirect using apache Location #10996

Open ChipCE opened 5 years ago

ChipCE commented 5 years ago

Please provide the following information In my college network, they block all access except HTTP/https that make me unable to access my home server. So I setup qbittorrent-nox listening on port 28080 and use apache <Location /torrent> to redirect access from https://myddnsaddr.ddns.net/torrent to the local address 192.168.1.102:28080. I cannot set webUI port to 443 because i have multi-application running on apache server too. Thanks in advance!

qBittorrent version and Operating System

Debian 10 kernel 4.19.0-5-amd64 qbittorrent-nox 4.1.5-1

What is the problem

The web UI only show texts, cannot load scripts and images.

What is the expected behavior

Can access the web UI.

Steps to reproduce

Extra info(if any)

/home/qbtuser/.config/qBittorrent/qBittorrent.conf

[AutoRun]
enabled=false
program=

[BitTorrent]
Session\CreateTorrentSubfolder=true
Session\DisableAutoTMMByDefault=true
Session\DisableAutoTMMTriggers\CategoryChanged=false
Session\DisableAutoTMMTriggers\CategorySavePathChanged=true
Session\DisableAutoTMMTriggers\DefaultSavePathChanged=true

[Core]
AutoDeleteAddedTorrentFile=Never

[LegalNotice]
Accepted=true

[Network]
Cookies="__cfduid=de58079c9f2f4513ef19a27ec66429fc81564251626; HttpOnly; expires=Sun, 26-Jul-2020 18:20:26 GMT; domain=.geolite.maxmind.com; path=/"

[Preferences]
Bittorrent\AddTrackers=false
Bittorrent\MaxRatioAction=0
Bittorrent\PeX=true
Connection\GlobalDLLimitAlt=10
Connection\GlobalUPLimitAlt=10
Connection\Interface=enp1s0f1
Downloads\PreAllocation=false
Downloads\SavePath=/mnt/download/
Downloads\ScanDirsV2=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0\x1a\0/\0m\0n\0t\0/\0\x64\0o\0w\0n\0l\0o\0\x61\0\x64\0\0\0\x2\0\0\0\0)
Downloads\StartInPause=false
DynDNS\DomainName=changeme.dyndns.org
DynDNS\Enabled=false
DynDNS\Password=
DynDNS\Service=0
DynDNS\Username=
General\Locale=en
General\UseRandomPort=false
MailNotification\email=
MailNotification\enabled=false
MailNotification\password=
MailNotification\req_auth=true
MailNotification\req_ssl=false
MailNotification\sender=qBittorrent_notification@example.com
MailNotification\smtp_server=smtp.changeme.com
MailNotification\username=
Queueing\MaxActiveDownloads=7
Queueing\MaxActiveTorrents=7
WebUI\Address=
WebUI\AlternativeUIEnabled=false
WebUI\AuthSubnetWhitelist=@Invalid()
WebUI\AuthSubnetWhitelistEnabled=false
WebUI\CSRFProtection=false
WebUI\ClickjackingProtection=false
WebUI\HTTPS\Certificate=
WebUI\HTTPS\Enabled=false
WebUI\HTTPS\Key=
WebUI\HostHeaderValidation=false
WebUI\LocalHostAuth=false
WebUI\Password_ha1=@ByteArray(59e302554715181ca432c2a3efd2c8bb)
WebUI\Port=28080
WebUI\RootFolder=
WebUI\ServerDomains=*
WebUI\UseUPnP=false
WebUI\Username=chip

/etc/apache2/sites-available/torrent.conf


    
        ServerAdmin webmaster@localhost
        ServerName mynoipaddr.ddns.net/torrent
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        SSLEngine on
        SSLProxyEngine on
        SSLCertificateFile  /etc/apache2/ssl/apache.crt
        SSLCertificateKeyFile /etc/apache2/ssl/apache.key
        
                SSLOptions +StdEnvVars
        
        
                SSLOptions +StdEnvVars
        
    
    
        ProxyPass http://localhost:28080
        Order allow,deny
        Allow from all
    
    Redirect permanent /torrent http://192.168.1.102:28080

/var/log/torrent-error.log

[Tue Jul 30 20:14:25.579196 2019] [ssl:warn] [pid 9793:tid 140178661270656] AH01906: mynoipaddr.ddns.net/torrent:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Jul 30 20:14:25.579321 2019] [ssl:warn] [pid 9793:tid 140178661270656] AH01909: mynoipaddr.ddns.net/torrent:443:0 server certificate does NOT include an ID which matches the server name
[Tue Jul 30 20:14:25.597545 2019] [ssl:warn] [pid 9795:tid 140178661270656] AH01906: mynoipaddr.ddns.net/torrent:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Jul 30 20:14:25.597581 2019] [ssl:warn] [pid 9795:tid 140178661270656] AH01909: mynoipaddr.ddns.net/torrent:443:0 server certificate does NOT include an ID which matches the server name

And the console log of firefox

.
.
The script from “https://mynoipaddr.ddns.net/scripts/misc.js?locale=en” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type. torrent
The script from “https://mynoipaddr.ddns.net/scripts/lib/mootools-1.2-core-yc.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type. torrent
Loading failed for the  Githubissues.
            
  • Githubissues is a development platform for aggregating issues.