map $host $lam { default ldap-account-manager; } map $host $kodi { default kodi.shore.co.il; } server { listen 80; listen [::]:80; server_name www.shore.co.il; include snippets/robots-allow-all.conf; include snippets/ads-txt.conf; include snippets/security-txt.conf; location = / { return 301 https://$host/blog/; } location /repo/ { root /var/www/www.shore.co.il/; autoindex on; } location / { return 301 https://$host$request_uri; } } server { listen 443 ssl; listen [::]:443 ssl; server_name www.shore.co.il; include snippets/robots-allow-all.conf; include snippets/ads-txt.conf; include snippets/security-txt.conf; include snippets/ssl.conf; root /var/www/www.shore.co.il/; error_page 404 /; location /repo/ { autoindex on; } location = /resume { try_files $uri /resume/resume.html; } location = /resume/ { index resume.html; } location = / { return 301 https://$host/blog/; } location /about { return 301 https://$host/blog/pages/about-me.html; } location /spam { return 301 https://$host/blog/pages/spam.html; } location = /blog { try_files $uri /blog/index.html; charset UTF-8; } location /cgit { return 301 https://git.shore.co.il/explore; } location /cgit/ { return 301 https://git.shore.co.il/explore; } location /git { return 301 https://git.shore.co.il/explore; } location /git/ { return 301 https://git.shore.co.il/explore; } location /lam { proxy_pass http://$lam$request_uri; proxy_http_version 1.1; include snippets/proxy-headers.conf; include snippets/allow-private-ips.conf; } location /jellyfin { return 302 $scheme://$host/jellyfin/; } location /jellyfin/ { proxy_pass http://$kodi:8096/jellyfin/; proxy_http_version 1.1; include snippets/proxy-headers.conf; include snippets/common-headers.conf; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; # Disable buffering when the nginx proxy gets very resource heavy upon streaming proxy_buffering off; } location /TRANSMISSION/ { proxy_pass http://kodi.shore.co.il:9091/; proxy_http_version 1.1; include snippets/proxy-headers.conf; } }