daily pastebin goal
75%
SHARE
TWEET

NGINX

yuriw Jan 11th, 2019 (edited) 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##
  2. # You should look at the following URL's in order to grasp a solid understanding
  3. # of Nginx configuration files in order to fully unleash the power of Nginx.
  4. # http://wiki.nginx.org/Pitfalls
  5. # http://wiki.nginx.org/QuickStart
  6. # http://wiki.nginx.org/Configuration
  7. #
  8. # Generally, you will want to move this file somewhere, and start with a clean
  9. # file but keep this around for reference. Or just disable in sites-enabled.
  10. #
  11. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  12. ##
  13.  
  14. # Default server configuration
  15. #
  16. server {
  17.     listen 80 default_server;
  18.     listen [::]:80 default_server;
  19.  
  20.     # SSL configuration
  21.     #
  22.     # listen 443 ssl default_server;
  23.     # listen [::]:443 ssl default_server;
  24.     #
  25.     # Note: You should disable gzip for SSL traffic.
  26.     # See: https://bugs.debian.org/773332
  27.     #
  28.     # Read up on ssl_ciphers to ensure a secure configuration.
  29.     # See: https://bugs.debian.org/765782
  30.     #
  31.     # Self signed certs generated by the ssl-cert package
  32.     # Don't use them in a production server!
  33.     #
  34.     # include snippets/snakeoil.conf;
  35.  
  36.     root /var/www/html;
  37.  
  38.     # Add index.php to the list if you are using PHP
  39.     index index.html index.htm index.nginx-debian.html;
  40.  
  41.     server_name _;
  42.  
  43.     location / {
  44.         # First attempt to serve request as file, then
  45.         # as directory, then fall back to displaying a 404.
  46.         try_files $uri $uri/ =404;
  47.     }
  48.  
  49. #        ## Emby ##
  50. #        location /emby {
  51. #             rewrite /emby/(.*) /$1 break;
  52. #             proxy_pass http://127.0.0.1:8096;
  53. #             proxy_redirect off;
  54. #             proxy_set_header Host $host;
  55. #             proxy_set_header X-Real-IP $remote_addr;
  56. #             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  57. #             #auth_basic "Restricted";
  58. #             #auth_basic_user_file "/etc/nginx/.htpasswd";
  59. #        }
  60.  
  61.  
  62.         ## Sonarr ##
  63.         location /sonarr {
  64.              proxy_pass http://127.0.0.1:8989;
  65.              proxy_set_header Host $host;
  66.              proxy_set_header X-Real-IP $remote_addr;
  67.              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  68.         }
  69.  
  70.         ## Sabnzbd ##
  71.         location /sabnzbd {
  72.              proxy_redirect off;
  73.              proxy_set_header Host $host;
  74.              proxy_set_header X-Real-IP $remote_addr;
  75.              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  76.              proxy_pass http://localhost:9090;
  77.         }
  78.  
  79.  
  80.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  81.     #
  82.     #location ~ \.php$ {
  83.     #   include snippets/fastcgi-php.conf;
  84.     #
  85.     #   # With php7.0-cgi alone:
  86.     #   fastcgi_pass 127.0.0.1:9000;
  87.     #   # With php7.0-fpm:
  88.     #   fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  89.     #}
  90.  
  91.     # deny access to .htaccess files, if Apache's document root
  92.     # concurs with nginx's one
  93.     #
  94.     #location ~ /\.ht {
  95.     #   deny all;
  96.     #}
  97. }
  98.  
  99.  
  100. # Virtual Host configuration for example.com
  101. #
  102. # You can move that to a different file under sites-available/ and symlink that
  103. # to sites-enabled/ to enable it.
  104. #
  105. #server {
  106. #   listen 80;
  107. #   listen [::]:80;
  108. #
  109. #   server_name example.com;
  110. #
  111. #   root /var/www/example.com;
  112. #   index index.html;
  113. #
  114. #   location / {
  115. #       try_files $uri $uri/ =404;
  116. #   }
  117. #}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top