Created
October 30, 2016 22:06
-
-
Save jee-r/e2f8453000b3d345777897055c906647 to your computer and use it in GitHub Desktop.
emby nginx proxypass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See: https://emby.media/community/index.php?/topic/22889-emby-behind-a-reverse-proxy-remote-control-issue/ | |
server { | |
server_name mydomain; | |
listen 80; | |
rewrite ^ https://mydomain$request_uri? permanent; | |
} | |
server { | |
server_name mydomain; | |
listen 443 ssl spdy; | |
ssl_certificate ; | |
ssl_certificate_key ; | |
ssl_prefer_server_ciphers On; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers 'AES256+EECDH:AES256+EDH:!aNULL'; | |
ssl_stapling on; | |
resolver 8.8.8.8 8.8.4.4 valid=300s; | |
resolver_timeout 5s; | |
ssl_stapling_verify on; | |
ssl_trusted_certificate /etc/ssl/ca-certs.pem; | |
keepalive_timeout 180; | |
# This is for strict transport security HSTS | |
# add_header Strict-Transport-Security max-age=31536000; | |
client_max_body_size 1024M; | |
location / { | |
# Send traffic to the backend | |
proxy_pass http://127.0.0.1:8096; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto $remote_addr; | |
proxy_set_header X-Forwarded-Protocol $scheme; | |
proxy_redirect off; | |
# Send websocket data to the backend aswell | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment