Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. #user nobody;
  2. worker_processes 1;
  3.  
  4. events {
  5. worker_connections 1024;
  6. }
  7.  
  8. http {
  9. include mime.types;
  10. default_type application/octet-stream;
  11. sendfile on;
  12. keepalive_timeout 65;
  13.  
  14. server {
  15. listen 80;
  16. server_name ~^(.+)$;
  17. location ^~ /.well-known/acme-challenge/ {
  18. default_type "text/plain";
  19. root /nginx/www/organizr/html;
  20. }
  21. location / {
  22. return 301 https://$host$request_uri;
  23. }
  24. }
  25. server {
  26. listen 443;
  27. #CHANGE THESE LINES##########
  28. server_name example.com localhost;
  29. ssl on;
  30. ssl_certificate C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\example.com-chain.pem;
  31. ssl_certificate_key C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\example.com-key.pem;
  32. ssl_trusted_certificate C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\example.com-crt.pem;
  33. include /nginx/conf/ssl.conf; #SSL_CONF
  34. root /nginx/www/organizr/html;
  35. #############################
  36. index index.php index.html index.htm;
  37. error_page 400 401 403 404 405 408 500 502 503 504 /error.php?error=$status;
  38. location ~ \.php$ {
  39. fastcgi_pass 127.0.0.1:9000;
  40. fastcgi_index index.php;
  41. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  42. include fastcgi_params;
  43. }
  44. location ~ /auth-(.*) {
  45. internal;
  46. rewrite ^/auth-(.*) /api/?v1/auth&group=$1;
  47. }
  48.  
  49. location /radarr {
  50.  
  51. auth_request /auth-0;
  52. proxy_pass http://127.0.0.1:7878/radarr;
  53. proxy_set_header X-Real-IP $remote_addr;
  54. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  55. proxy_set_header X-Forwarded-Proto $scheme;
  56. proxy_http_version 1.1;
  57. proxy_no_cache $cookie_session;
  58. # Allow the Radarr API through if you enable Auth on the block above
  59. location /radarr/api { auth_request off;
  60. proxy_pass http://127.0.0.1:7878/radarr/api;
  61.  
  62. }
  63.  
  64. }
  65.  
  66. location /plex {
  67.  
  68. auth_request /auth-0;
  69. proxy_pass http://127.0.0.1:32400/;
  70. proxy_set_header Host $host;
  71. proxy_set_header X-Real-IP $remote_addr;
  72. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  73. # Websockets
  74. proxy_http_version 1.1;
  75. proxy_set_header Upgrade $http_upgrade;
  76. proxy_set_header Connection "upgrade";
  77. }
  78.  
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement