Skip to content

Instantly share code, notes, and snippets.

@BeyondEvil
Last active Jun 22, 2019
Embed
What would you like to do?
server {
listen 443 ssl;
server_name domain.synology.me 192.168.11.10;
location / {
proxy_pass https://192.168.11.10:5001;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
user mrsmith staff;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
include /usr/local/etc/nginx/servers/usenet.conf;
include /usr/local/etc/nginx/servers/domain.conf;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name myvery.owndomain.com 192.168.13.10;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/myvery.owndomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/myvery.owndomain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
server_name myvery.owndomain.com 192.168.13.10;
location /web {
# serve the CSS code
proxy_pass http://127.0.0.1:32400;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /plex {
# proxy request to plex server
proxy_pass http://127.0.0.1:32400/web;
}
location /sab {
proxy_pass http://127.0.0.1:9080;
}
location /sonarr {
proxy_pass http://127.0.0.1:8989;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_buffering off;
}
location /radarr {
proxy_pass http://127.0.0.1:7878;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_buffering off;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment