Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
1,480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. error_log /var/log/nginx/error.log info;
  4. pid /var/run/nginx.pid;
  5.  
  6. events {
  7. worker_connections 1024;
  8. }
  9.  
  10. http {
  11.  
  12. upstream inside.example.lcl {
  13. server 192.168.1.1:443;
  14. keepalive 16;
  15. }
  16.  
  17. server {
  18. listen 80;
  19. listen [::]:80;
  20. server_name owa.contoso.com autodiscover.contoso.com;
  21. return 301 https://$host$request_uri;
  22. }
  23.  
  24. server {
  25. listen 443;
  26. listen [::]:443;
  27. client_max_body_size 2G;
  28.  
  29. ssl on;
  30. ssl_certificate /etc/ssl/certs/chain.crt;
  31. ssl_certificate_key /etc/ssl/private/priv.key;
  32. ssl_session_timeout 5m;
  33. ssl_session_cache shared:SSL:60m;
  34.  
  35. ssl_prefer_server_ciphers On;
  36. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  37. ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
  38. ssl_dhparam /etc/ssl/dhparams.pem;
  39.  
  40. server_name owa.contoso.com;
  41. location / { return 301 https://owa.contoso.com/owa; }
  42.  
  43. proxy_read_timeout 360;
  44. proxy_pass_header Date;
  45. proxy_pass_header Server;
  46. proxy_pass_header Authorization;
  47.  
  48. proxy_pass_request_headers on;
  49. proxy_http_version 1.1;
  50.  
  51. proxy_set_header Host $host;
  52. proxy_set_header X-Real-IP $remote_addr;
  53. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  54. proxy_set_header Connection "Keep-Alive";
  55. proxy_request_buffering off;
  56. proxy_buffering off;
  57.  
  58. location ~* ^/owa { proxy_pass https://inside.example.lcl;
  59. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  60. location ~* ^/Microsoft-Server-ActiveSync { proxy_pass https://inside.example.lcl;
  61. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  62. location ~* ^/ecp { proxy_pass https://inside.example.lcl;
  63. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  64. location ~* ^/rpc { proxy_pass https://inside.example.lcl;
  65. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  66. location ~* ^/ews { proxy_pass https://inside.example.lcl;
  67. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  68. location ~* ^/OAB { proxy_pass https://inside.example.lcl;
  69. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  70. location ~* ^/AutoDiscover { proxy_pass https://inside.example.lcl;
  71. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  72. location ~* ^/mapi { proxy_pass https://inside.example.lcl;
  73. proxy_next_upstream error timeout invalid_header http_500 http_503; }
  74.  
  75. error_log /var/log/nginx/owa-err.log;
  76. access_log /var/log/nginx/owa-acc.log;
  77. }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement