Advertisement
08091996

nginx.conf

May 9th, 2018
1,232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #user  nobody;
  2. worker_processes  1;
  3.  
  4. # This default error log path is compiled-in to make sure configuration parsing
  5. # errors are logged somewhere, especially during unattended boot when stderr
  6. # isn't normally logged anywhere. This path will be touched on every nginx
  7. # start regardless of error log location configured here. See
  8. # https://trac.nginx.org/nginx/ticket/147 for more info.
  9. #
  10. #error_log  /var/log/nginx/error.log;
  11. #
  12.  
  13. #pid        logs/nginx.pid;
  14.  
  15.  
  16. events {
  17.     worker_connections  1024;
  18. }
  19.  
  20.  
  21. http {
  22.     include       mime.types;
  23.     default_type  application/octet-stream;
  24.  
  25.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  26.     #                  '$status $body_bytes_sent "$http_referer" '
  27.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  28.  
  29.     #access_log  logs/access.log  main;
  30.  
  31.     sendfile        on;
  32.     #tcp_nopush     on;
  33.  
  34.     #keepalive_timeout  0;
  35.     keepalive_timeout  65;
  36.  
  37.     #gzip  on;
  38.  
  39.     server {
  40.         listen       80;
  41.         server_name  secretlair.nl;
  42.         return 301   https://$host$request_uri;
  43.  
  44.         #charset koi8-r;
  45.  
  46.         #access_log  logs/host.access.log  main;
  47.  
  48.         location / {
  49.             root   /usr/local/www/nginx;
  50.             index  index.html index.htm;
  51.         }
  52.  
  53.         #error_page  404              /404.html;
  54.  
  55.         # redirect server error pages to the static page /50x.html
  56.         #
  57.         error_page   500 502 503 504  /50x.html;
  58.         location = /50x.html {
  59.             root   /usr/local/www/nginx-dist;
  60.         }
  61.  
  62.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  63.         #
  64.         #location ~ \.php$ {
  65.         #    proxy_pass   http://127.0.0.1;
  66.         #}
  67.  
  68.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  69.         #
  70.         #location ~ \.php$ {
  71.         #    root           html;
  72.         #    fastcgi_pass   127.0.0.1:9000;
  73.         #    fastcgi_index  index.php;
  74.         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  75.         #    include        fastcgi_params;
  76.         #}
  77.  
  78.         # deny access to .htaccess files, if Apache's document root
  79.         # concurs with nginx's one
  80.         #
  81.         #location ~ /\.ht {
  82.         #    deny  all;
  83.         #}
  84.     }
  85.    
  86.     server {
  87.         listen 443 ssl;
  88.         server_name  secretlair.nl;
  89.         include ssl_common.conf;
  90.         include proxy_setup.conf;
  91.        
  92.         # Custom error pages
  93.         error_page 400 401 402 403 404 405 408 500 502 503 504 $scheme://$server_name/error.php?error=$status;
  94.        
  95.         location /auth-admin {
  96.                 internal;
  97.                 proxy_pass https://secretlair.nl/auth.php?admin;
  98.                 proxy_pass_request_body off;
  99.                 proxy_set_header Content-Length "";
  100.                 proxy_set_header X-Original-URI $request_uri;
  101.     }
  102.  
  103.         location /auth-user{
  104.                 internal;
  105.                 proxy_pass https://secretlair.nl/auth.php?user;
  106.                 proxy_pass_request_body off;
  107.                 proxy_set_header Content-Length "";
  108.                 proxy_set_header X-Original-URI $request_uri;
  109.     }
  110.     }
  111.    
  112.         server {
  113.         listen 443 ssl;
  114.         server_name  streambase.nl;
  115.         include ssl_common.conf;
  116.         include plex.conf;
  117.     }
  118.    
  119.     server {  
  120.     listen 443 ssl http2;
  121.     server_name filebase.nl;
  122.  
  123.     #SSL settings
  124.     include ssl_common.conf;
  125.  
  126.     client_max_body_size 0;
  127.    
  128.     ### For iFraming uncomment line 260 in the response.php file: header('X-Frame-Options: SAMEORIGIN'); // Disallow iFraming from other domains
  129.     ### nextcloud/lib/private/legacy/response.php
  130.     ### uncomment with //
  131.    
  132.     location / {
  133.     proxy_pass https://192.168.1.13/;
  134.     proxy_max_temp_file_size 2048m;
  135.     include proxy.conf;
  136.   }
  137. }
  138.  
  139.     # another virtual host using mix of IP-, name-, and port-based configuration
  140.     #
  141.     #server {
  142.     #    listen       8000;
  143.     #    listen       somename:8080;
  144.     #    server_name  somename  alias  another.alias;
  145.  
  146.     #    location / {
  147.     #        root   html;
  148.     #        index  index.html index.htm;
  149.     #    }
  150.     #}
  151.  
  152.  
  153.     # HTTPS server
  154.     #
  155.     #server {
  156.     #    listen       443 ssl;
  157.     #    server_name  localhost;
  158.  
  159.     #    ssl_certificate      cert.pem;
  160.     #    ssl_certificate_key  cert.key;
  161.  
  162.     #    ssl_session_cache    shared:SSL:1m;
  163.     #    ssl_session_timeout  5m;
  164.  
  165.     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  166.     #    ssl_prefer_server_ciphers  on;
  167.  
  168.     #    location / {
  169.     #        root   html;
  170.     #        index  index.html index.htm;
  171.     #    }
  172.     #}
  173.  
  174. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement