Reverse proxy for Deluge-VPN questions
Deluge-VPN docker is running absolutely amazing, I just could not get the reverse proxy to work.
Here is the log for letsencrypt
-------------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donations/
-------------------------------------
GID/UID
-------------------------------------
User uid: 99
User gid: 100
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
2048 bit DH parameters present
SUBDOMAINS entered, processing
Sub-domains processed are: -d www.[my_external_domain] -d cloud.[my_external_domain] -d download.[my_external_domain] -d sickrage.[my_external_domain] -d couchpotato.[my_external_domain] -d plex.[my_external_domain]
<------------------------------------------------->
<------------------------------------------------->
cronjob running on Tue May 23 10:21:39 ICT 2017
Running certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/[my_external_domain].conf
-------------------------------------------------------------------------------
Cert not yet due for renewal
No renewals attempted, so not running post-hook
The following certs are not due for renewal yet:
/etc/letsencrypt/live/[my_external_domain]/fullchain.pem (skipped)
No renewals were attempted.
Server ready
[cont-init.d] 50-config: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Here is the configuration for letsencrypt nginx
upstream backend {
server 192.168.0.29:19999;
keepalive 64;
}
server {
listen 443 ssl default_server;
listen 80 default_server;
root /config/www;
index index.html index.htm index.php;
server_name _;
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
ssl_dhparam /config/nginx/dhparams.pem;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
ssl_prefer_server_ciphers on;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
proxy_pass http://192.168.0.29:82/;
}
#HeadPhones
location /headphones {
include /config/nginx/proxy.conf;
proxy_pass http://192.168.0.29:8181/headphones;
}
location /downloads {
include /config/nginx/proxy.conf;
proxy_pass http://192.168.0.29:8112/;
proxy_set_header X-Deluge-Base “/downloads/”;
add_header X-Frame-Options SAMEORIGIN;
}
# Radarr
#location /radarr {
#include /config/nginx/proxy.conf;
#proxy_pass http://192.168.0.29:7878/radarr;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#}
# Transmission
#location /transmission {
#proxy_pass http://192.168.0.29:9091;
#proxy_set_header Host $host;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#}
# CouchPotato
location /couchpotato {
include /config/nginx/proxy.conf;
proxy_pass http://192.168.0.29:5050;
}
# SickRage
location /sickrage {
include /config/nginx/proxy.conf;
proxy_pass http://192.168.0.29:8081;
}
#PLEX
location /web {
# serve the CSS code
proxy_pass http://192.168.0.29:32400;
}
# Main /plex rewrite
location /plex {
# proxy request to plex server
proxy_pass http://192.168.0.29:32400/web;
}
location /nextcloud {
include /config/nginx/proxy.conf;
proxy_pass https://192.168.0.29:444;
}
location /unifi {
include /config/nginx/proxy.conf;
proxy_pass https://192.168.0.18/;
}
location ~ /netdata/(?<ndpath>.*) {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://backend/$ndpath$is_args$args;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
}
}
proxy.conf
client_max_body_size 10m;
client_body_buffer_size 128k;
#Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
# Advanced Proxy Config
send_timeout 5m;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_connect_timeout 240;
# Basic Proxy Config
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect http:// $scheme://;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_buffers 32 4k;
this is the error i get when i tried to connect to my deluge WEB through MY_EXTERNAL_DOMAIN_ADDRESS
web.Server Traceback (most recent call last):
exceptions.TypeError: normalize() argument 2 must be unicode, not str
/usr/lib/python2.7/site-packages/twisted/web/server.py:185 in process
184 try:
185 resrc = self.site.getResourceFor(self)
186 if resource._IEncodingResource.providedBy(resrc):
/usr/lib/python2.7/site-packages/twisted/web/server.py:791 in getResourceFor
790 request.sitepath = copy.copy(request.prepath)
791 return resource.getChildForRequest(self.resource, request)
792
/usr/lib/python2.7/site-packages/twisted/web/resource.py:98 in getChildForRequest
97 request.prepath.append(pathElement)
98 resource = resource.getChildWithDefault(pathElement, request)
99 return resource
/usr/lib/python2.7/site-packages/deluge/ui/web/server.py:559 in getChildWithDefault
558
559 request.base = base.encode('idna')
560
/usr/lib/python2.7/encodings/idna.py:164 in encode
163 for label in labels:
164 result.append(ToASCII(label))
165 # Join with U+002E
/usr/lib/python2.7/encodings/idna.py:76 in ToASCII
75 # Step 2: nameprep
76 label = nameprep(label)
77
/usr/lib/python2.7/encodings/idna.py:21 in nameprep
20 continue
21 newlabel.append(stringprep.map_table_b2(c))
22 label = u"".join(newlabel)
/usr/lib/python2.7/stringprep.py:197 in map_table_b2
196 al = map_table_b3(a)
197 b = unicodedata.normalize("NFKC", al)
198 bl = u"".join([map_table_b3(ch) for ch in b])
exceptions.TypeError: normalize() argument 2 must be unicode, not str
Thank you so much.