Advertisement
Guest User

Untitled

a guest
Dec 26th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 5.44 KB | None | 0 0
  1. #user  nobody;
  2. worker_processes  1;
  3.  
  4. #error_log  logs/error.log;
  5. #error_log  logs/error.log  notice;
  6. #error_log  logs/error.log  info;
  7.  
  8. #pid        logs/nginx.pid;
  9.  
  10. events {
  11.     worker_connections  1024;
  12. }
  13.  
  14.  
  15. http {
  16.     include       mime.types;
  17.     default_type  application/octet-stream;
  18.  
  19.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  20.     #                  '$status $body_bytes_sent "$http_referer" '
  21.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  22.  
  23.     #access_log  logs/access.log  main;
  24.  
  25.     sendfile        on;
  26.     #tcp_nopush     on;
  27.  
  28.     #keepalive_timeout  0;
  29.     keepalive_timeout  65;
  30.  
  31.     #gzip  on;
  32.  
  33.     ssl_certificate      ironhide.pem;
  34.     ssl_certificate_key  ironhide.key;
  35.  
  36.     ssl_session_cache    shared:SSL:1m;
  37.     ssl_session_timeout  5m;
  38.  
  39.     ssl_ciphers  HIGH:!aNULL:!MD5;
  40.     ssl_prefer_server_ciphers  on;
  41.    
  42.     ###########
  43.     #UPSTREAMS#
  44.     ###########
  45.     upstream plex-upstream          { server 192.168.2.243:32400; }
  46.     upstream plexpy-upstream        { server 192.168.2.243:8181; }
  47.     upstream sonarr-upstream        { server 192.168.2.243:8989; }
  48.     upstream radarr-upstream        { server 192.168.2.243:7878; }
  49.     upstream ombi-upstream          { server 192.168.2.243:5000; }
  50.     upstream sabnzbd-upstream       { server 192.168.2.243:8085; }
  51.    
  52.     server {
  53.         listen       80;
  54.         listen      443 ssl http2;
  55.         server_name  localhost ironhide.media www.ironhide.media;
  56.  
  57.  
  58.         #charset koi8-r;
  59.  
  60.         #access_log  logs/host.access.log  main;
  61.  
  62.         location / {
  63.             root   html;
  64.             index  index.php index.html index.htm;
  65.         }
  66.  
  67.         #error_page  404              /404.html;
  68.  
  69.         # redirect server error pages to the static page /50x.html
  70.         #
  71.         error_page   500 502 503 504  /50x.html;
  72.         location = /50x.html {
  73.             root   html;
  74.         }
  75.  
  76.  
  77.         #pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  78.         #
  79.         location ~ \.php$ {
  80.             root           html;
  81.             fastcgi_pass   127.0.0.1:9000;
  82.             fastcgi_index  index.php;
  83.             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
  84.             include        fastcgi_params;
  85.         }
  86.  
  87.          #deny access to .htaccess files, if Apache's document root
  88.          #concurs with nginx's one
  89.        
  90.         location ~ /\.ht {
  91.             deny  all;
  92.         }
  93.        
  94.         location /sabnzbd {
  95.             proxy_pass http://sabnzbd-upstream/sabnzbd;
  96.             client_max_body_size 10m;
  97.             client_body_buffer_size 128k;
  98.  
  99.             #Timeout if the real server is dead
  100.             proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
  101.  
  102.             # Advanced Proxy Config
  103.             send_timeout 5m;
  104.             proxy_read_timeout 240;
  105.             proxy_send_timeout 240;
  106.             proxy_connect_timeout 240;
  107.  
  108.             # Basic Proxy Config
  109.             proxy_set_header Host $host;
  110.             proxy_set_header X-Real-IP $remote_addr;
  111.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  112.             proxy_set_header X-Forwarded-Proto https;
  113.             proxy_redirect  http://  $scheme://;
  114.             proxy_http_version 1.1;
  115.             proxy_set_header Connection "";
  116.             proxy_cache_bypass $cookie_session;
  117.             proxy_no_cache $cookie_session;
  118.             proxy_buffers 32 4k;
  119.  
  120.         }
  121.        
  122.     }
  123.    
  124.     server {
  125.         listen       80;
  126.         listen      443 ssl http2;
  127.         server_name  plex.ironhide.media;
  128.         location /plex {
  129.             root   html;
  130.             proxy_pass http://plex-upstream;
  131.             include proxy.conf;
  132.         }
  133.  
  134.         if ($http_referer ~* /plex/) {
  135.                 rewrite ^/web/(.*) /plex/web/$1? redirect;
  136.         }  
  137.     }
  138.    
  139.     server {
  140.         listen       80;
  141.         listen      443 ssl http2;
  142.         server_name  plexpy.ironhide.media;
  143.         location / {
  144.             root   html;
  145.             proxy_pass http://plexpy-upstream;
  146.             include proxy.conf;
  147.         }
  148.     }
  149.    
  150.     server {
  151.         listen       80;
  152.         listen      443 ssl http2;
  153.         server_name  sonarr.ironhide.media;
  154.         location / {
  155.             root   html;
  156.             proxy_pass http://sonarr-upstream;
  157.             include proxy.conf;
  158.  
  159.         }
  160.     }
  161.    
  162.     server {
  163.         listen       80;
  164.         listen      443 ssl http2;
  165.         server_name  radarr.ironhide.media;
  166.         location / {
  167.             root   html;
  168.             proxy_pass http://radarr-upstream;
  169.             include proxy.conf;
  170.  
  171.         }
  172.     }
  173.    
  174.     server {
  175.         listen       80;
  176.         listen      443 ssl http2;
  177.         server_name  ombi.ironhide.media;
  178.         location /ombi {
  179.             root   html;
  180.             proxy_pass http://ombi-upstream;
  181.             include proxy.conf:
  182.            
  183.         }
  184.     }
  185.    
  186.     server {
  187.         listen       80;
  188.         listen      443 ssl http2;
  189.         server_name  sabnzbd.ironhide.media;
  190.         location / {
  191.             root   html;
  192.             proxy_pass http://sabnzbd-upstream;
  193.             client_max_body_size 10m;
  194.             client_body_buffer_size 128k;
  195.  
  196.             #Timeout if the real server is dead
  197.             proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
  198.  
  199.             # Advanced Proxy Config
  200.             send_timeout 5m;
  201.             proxy_read_timeout 240;
  202.             proxy_send_timeout 240;
  203.             proxy_connect_timeout 240;
  204.  
  205.             # Basic Proxy Config
  206.             proxy_set_header Host $host;
  207.             proxy_set_header X-Real-IP $remote_addr;
  208.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  209.             proxy_set_header X-Forwarded-Proto https;
  210.             proxy_redirect  http://  $scheme://;
  211.             proxy_http_version 1.1;
  212.             proxy_set_header Connection "";
  213.             proxy_cache_bypass $cookie_session;
  214.             proxy_no_cache $cookie_session;
  215.             proxy_buffers 32 4k;
  216.  
  217.         }
  218.     }
  219.  
  220. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement