daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Jan 21st, 2017 12 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. map $remote_addr $log_ip {
  2.      "~192.168..*" 0;
  3.      default 1;
  4.  }
  5.  
  6. server {
  7.   listen 80;
  8.   server_name _;
  9.   return 444;
  10. }
  11.  
  12. server {
  13.   listen 443 ssl http2;
  14.   server_name my-domain.de;
  15.   ssl on;
  16.   include /etc/nginx/snippets/strong-ssl.conf;
  17.   ssl_certificate /etc/letsencrypt/live/my-domain.de/fullchain.pem;
  18.   ssl_certificate_key /etc/letsencrypt/live/my-domain.de/privkey.pem;
  19.   root /var/www/html;
  20.   index index.html index.htm index.nginx-debian.html;
  21.   error_page 401 403 404 /404.html;
  22.   access_log /var/log/nginx/proxy.log main if=$log_ip;
  23.   error_log /var/log/nginx/error.log;
  24.  
  25.   location / {
  26.     try_files $uri $uri/ =404;
  27.   }
  28.  
  29.   location ~ /\.ht {
  30.           deny all;
  31.   }
  32.  
  33.   location ~ /.well-known {
  34.           allow all;
  35.   }
  36.  
  37.   location /tinyrss/ {
  38.     proxy_pass https://192.168.2.61/tinyrss/;
  39.     include /etc/nginx/snippets/proxy.conf;
  40.   }
  41.  
  42.   location /nextcloud/ {
  43.     proxy_pass https://192.168.2.9/nextcloud/;
  44.     include /etc/nginx/snippets/proxy.conf;
  45.   }
  46.  
  47.   location /lychee/ {
  48.     proxy_pass https://192.168.2.8/;
  49.     include /etc/nginx/snippets/proxy.conf;
  50.   }
  51.  
  52.   location /blog/ {
  53.     proxy_pass https://192.168.2.12/blog/;
  54.     include /etc/nginx/snippets/proxy.conf;
  55.   }
  56.  
  57.   location /chevereto/ {
  58.     proxy_pass https://192.168.2.16/chevereto/;
  59.     include /etc/nginx/snippets/proxy.conf;
  60.   }
  61.  
  62.   location /bookstack/ {
  63.     proxy_pass https://192.168.2.14/;
  64.     include /etc/nginx/snippets/proxy.conf;
  65.   }
  66.  
  67. }
  68.  
  69. server {
  70.   listen 80;
  71.   server_name my-domain.de;
  72.   return 301 https://my-domain.de$request_uri;
  73. }
  74.  
  75. server {
  76.   listen 80;
  77.   server_name www.my-domain.de;
  78.   return 301 https://my-domain.de$request_uri;
  79. }
  80.  
  81. server {
  82.   listen 80;
  83.   server_name domain.homenet.org;
  84.   return 301 https://my-domain.de$request_uri;
  85. }
  86.  
  87. server {
  88.   listen 80;
  89.   server_name www.domain.homenet.org;
  90.   return 301 https://my-domain.de$request_uri;
  91. }
  92.  
  93. server {
  94.   listen 443;
  95.   server_name www.my-domain.de;
  96.   return 301 $scheme://my-domain.de$request_uri;
  97. }
  98.  
  99. server {
  100.   listen 443;
  101.   server_name www.domain.homenet.org;
  102.   return 301 $scheme://my-domain.de$request_uri;
  103. }
  104.  
  105. server {
  106.   listen 80;
  107.   server_name outlook.my-domain.de autodiscover.my-domain.de;
  108.   return 301 https://$server_name$request_uri;
  109.   error_log /var/log/nginx/exchange-error.log;
  110.   access_log /var/log/nginx/exchange-access.log;
  111. }
  112.  
  113. server {
  114.   listen 443;
  115.   server_name outlook.my-domain.de autodiscover.my-domain.de;
  116.   ssl on;
  117.   ssl_certificate /etc/letsencrypt/live/my-domain.de/fullchain.pem;
  118.   ssl_certificate_key /etc/letsencrypt/live/my-domain.de/privkey.pem;
  119.   ssl_session_timeout 360;
  120.   proxy_buffer_size 64k;
  121.   proxy_buffers 4 128k;
  122.   proxy_busy_buffers_size 128k;
  123.   proxy_read_timeout      360;
  124.   proxy_http_version 1.1;
  125.   proxy_pass_request_headers on;
  126.   proxy_pass_header       Date;
  127.   proxy_pass_header       Server;
  128.   proxy_set_header        Host $host;
  129.   proxy_set_header        X-Real-IP $remote_addr;
  130.   proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
  131.   proxy_set_header        Accept-Encoding "";
  132.   more_set_input_headers 'Authorization: $http_authorization';
  133.   proxy_set_header Accept-Encoding "";
  134.   more_set_headers -s 401 'WWW-Authenticate: Basic realm="outlook.my-domain.de"';
  135.   access_log /var/log/nginx/exchange-ssl-access.log;
  136.   error_log /var/log/nginx/exchange-ssl-error.log;
  137.  
  138.   location /                            { return 301 https://outlook.my-domain.de/owa; }
  139.   location /owa                         { proxy_pass https://outlook.my-domain.de/owa; }
  140.   location /OWA                         { proxy_pass https://outlook.my-domain.de/OWA; }
  141.   location /ecp                         { proxy_pass https://outlook.my-domain.de/ecp; }
  142.   location /ECP                         { proxy_pass https://outlook.my-domain.de/ECP; }
  143.   location /ews                         { proxy_pass https://outlook.my-domain.de/ews; }
  144.   location /EWS                         { proxy_pass https://outlook.my-domain.de/EWS; }
  145.   location /Microsoft-Server-ActiveSync { proxy_pass https://outlook.my-domain.de/Microsoft-Server-ActiveSync; }
  146.   location /mapi                        { proxy_pass https://outlook.my-domain.de/mapi; }
  147.   location /MAPI                        { proxy_pass https://outlook.my-domain.de/MAPI; }
  148.   location /rpc                         { proxy_pass https://outlook.my-domain.de/rpc; }
  149.   location /RPC                         { proxy_pass https://outlook.my-domain.de/RPC; }
  150.   location /oab                         { proxy_pass https://outlook.my-domain.de/oab; }
  151.   location /OAB                         { proxy_pass https://outlook.my-domain.de/OAB; }
  152.   location /autodiscover                { proxy_pass https://outlook.my-domain.de/autodiscover; }
  153.   location /Autodiscover                { proxy_pass https://outlook.my-domain.de/Autodiscover; }
  154. }
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