Last active
March 22, 2017 04:36
-
-
Save amalleo25/4277f151ba4f445cfbbf5c5c02491db3 to your computer and use it in GitHub Desktop.
Nginx config for plex
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name plex.example.com; | |
| rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https | |
| } | |
| server { | |
| listen 443 ssl; | |
| server_name plex.example.com; | |
| ssl_certificate /etc/ssl/certs/plex.example.com.crt; | |
| ssl_certificate_key /etc/ssl/private/plex.example.com.key; | |
| ssl_protocols TLSv1.2; | |
| ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4:!3DES:!SHA; | |
| ssl_prefer_server_ciphers on; | |
| ssl_session_cache shared:SSL:1m; | |
| server_tokens off; | |
| access_log /var/log/nginx/plex.access.log; | |
| error_log /var/log/nginx/plex.error.log; | |
| location / { | |
| proxy_pass http://x.x.x.x:32400; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_connect_timeout 36000s; | |
| proxy_read_timeout 36000s; | |
| proxy_send_timeout 36000s; | |
| send_timeout 36000s; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment