[/QUOTE]
I did not modify any of those files (there's two: "deluged" and "deluge_web"). Both of them just contain the exact ones that were installed with the pkg install. Are you having issues?
Nah, halfway posting i realized it was a pkg install and not a git install so it ships with stock rc.d files... everything is working as expected thanks! Just figuring out how to set the base url for deluge to be persistent for the reverse proxy...
=========================================================================================================
Reverse proxy guide
I've setup all the mentioned apps (just not transmission) in 1 jail. Where they all get /config i've created /config/app for each other app. (these need to be created on a dataset)
For reference how i've setup my nginx reverse proxy:
From FreeNAS console/ssh ->
Code:
iocage console JAILNAME
pkg install nano nginx openssl
mkdir /usr/local/etc/nginx/sites-enabled
mkdir /usr/local/etc/nginx/sites-available
mkdir /usr/local/etc/nginx/ssl
mkdir /usr/local/etc/nginx/conf.d
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /usr/local/etc/nginx/ssl/nginx.key -out /usr/local/etc/nginx/ssl/nginx.crt
cp /usr/local/etc/nginx/nginx.conf /usr/local/etc/nginx/nginx.conf.backup
cat /dev/null > /usr/local/etc/nginx/nginx.conf
nano /usr/local/etc/nginx/nginx.conf
paste this:
Code:
worker_processes auto;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server {
listen 80 default_server;
listen [::]:80 default_server;
# 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 192.168.3.25;
# certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
ssl_certificate /usr/local/etc/nginx/ssl/nginx.crt;
ssl_certificate_key /usr/local/etc/nginx/ssl/nginx.key;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
# modern configuration. tweak to your needs.
ssl_protocols TLSv1.2;
ssl_ciphers
'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
ssl_prefer_server_ciphers on;
# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security max-age=15768000;
resolver 192.168.3.5;
location /sabnzbd {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /sonarr {
proxy_pass http://127.0.0.1:8989;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /headphones {
proxy_pass http://127.0.0.1:8183;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /lazylibrarian {
proxy_pass http://127.0.0.1:5299;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /jackett {
proxy_pass http://127.0.0.1:9117;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /ombi {
proxy_pass http://127.0.0.1:3579;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /plexpy {
proxy_pass http://127.0.0.1:8181;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /radarr {
proxy_pass http://127.0.0.1:7878;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /deluge {
proxy_pass http://127.0.0.1:8112/;
proxy_set_header X-Deluge-Base "/deluge/";
}
}
}
Note that i've changed the port of headphones to 8183 to not interfere with plexpy.
Also change
Code:
server_name 192.168.3.25;
to your Jail IP.
And change the line below to match your Local DNS server ( You can remove this line if your not working with domain names locally, i have some other vhosts in ./sites-enabled/)
Code:
resolver 192.168.3.5;
hit Control+X -> hit y -> enter
Code:
service nginx restart
For each app change the Base url, for most you can do this in the webgui settings, some need to be done by config file:
Code:
sed -i '' -e 's?http_root = /?http_root = /headphones?g' /config/HEADPHONESDIR./config.ini
service headphones restart
The above app will now be accessable via HTTPS, change the base url via HTTP on the others, restart and there you go.