inital commit
This commit is contained in:
45
static/nginx/nginx.conf
Normal file
45
static/nginx/nginx.conf
Normal file
@@ -0,0 +1,45 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
32
static/nginx/proxy-control.conf
Normal file
32
static/nginx/proxy-control.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
proxy_connect_timeout 59s;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 36000s; ## Timeout after 10 hours
|
||||
proxy_buffer_size 64k;
|
||||
proxy_buffers 16 32k;
|
||||
proxy_pass_header Set-Cookie;
|
||||
proxy_hide_header Vary;
|
||||
|
||||
proxy_busy_buffers_size 64k;
|
||||
proxy_temp_file_write_size 64k;
|
||||
|
||||
proxy_set_header Accept-Encoding '';
|
||||
proxy_ignore_headers Cache-Control Expires;
|
||||
proxy_set_header Referer $http_referer;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
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_set_header X-Forwarded-Port '443';
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Authorization '';
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_redirect off;
|
||||
|
||||
## Required for Plex WebSockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
84
static/nginx/sites.conf
Normal file
84
static/nginx/sites.conf
Normal file
@@ -0,0 +1,84 @@
|
||||
server {
|
||||
listen 0.0.0.0:80 default_server;
|
||||
|
||||
location /deluge {
|
||||
return 302 $scheme://$host/deluge/;
|
||||
}
|
||||
|
||||
location /deluge/ {
|
||||
proxy_pass http://localhost:8001/;
|
||||
proxy_set_header X-Deluge-Base "/deluge/";
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
location /radarr {
|
||||
proxy_pass http://localhost:8002/radarr;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
# allow radarr api to be reached
|
||||
location /radarr/api {
|
||||
proxy_pass http://localhost:8002/radarr/api;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
location /sonarr {
|
||||
proxy_pass http://localhost:8003/sonarr;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
# allow sonarr api to be reached
|
||||
location /sonarr/api {
|
||||
proxy_pass http://localhost:8003/sonarr/api;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
location /openbooks {
|
||||
proxy_pass http://localhost:8004/openbooks/;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
# openbooks uses a subdirectory for websocket connections
|
||||
location /openbooks/ws {
|
||||
proxy_pass http://localhost:8004/openbooks/ws;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
location /jackett {
|
||||
proxy_pass http://localhost:8005/jackett;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
|
||||
# jellyfin doesn't require auth headers (it has its own authentication system)
|
||||
location /jellyfin {
|
||||
return 302 $scheme://$host/jellyfin/;
|
||||
}
|
||||
|
||||
location /jellyfin/ {
|
||||
proxy_pass http://localhost:8006;
|
||||
include proxy-control.conf;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8000/;
|
||||
include restrict-auth.conf;
|
||||
include proxy-control.conf;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user