Advertisement
Guest User

Docker - Nginx - Collabora

a guest
Jan 13th, 2018
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. server {
  2. listen 443 ssl;
  3. server_name office.example.com;
  4. ssl_certificate /etc/nginx/ssl/example.com.crt;
  5. ssl_certificate_key /etc/nginx/ssl/example.com.key;
  6.  
  7. ssl_session_timeout 5m;
  8. ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL';
  9. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  10. ssl_prefer_server_ciphers on;
  11. ssl_dhparam /etc/nginx/ssl/dhparams.pem;
  12. ssl_stapling on;
  13. ssl_stapling_verify on;
  14.  
  15. client_max_body_size 10G;
  16.  
  17. proxy_set_header X-Forwarded-Proto 'https';
  18. underscores_in_headers on;
  19.  
  20. add_header Strict-Transport-Security max-age=15768000;
  21. add_header X-Content-Type-Options nosniff;
  22. add_header X-Frame-Options "SAMEORIGIN";
  23. add_header X-XSS-Protection "1; mode=block";
  24. add_header X-Robots-Tag none;
  25. add_header X-Download-Options noopen;
  26. add_header X-Permitted-Cross-Domain-Policies none;
  27.  
  28. access_log /var/log/nginx/office.access.log;
  29. error_log /var/log/nginx/office.error.log;
  30.  
  31. proxy_buffering off;
  32.  
  33. location = /robots.txt {
  34. allow all;
  35. log_not_found off;
  36. access_log off;
  37.  
  38.  
  39. }
  40.  
  41. # static files
  42. location ^~ /loleaflet {
  43. proxy_pass https://192.168.0.100:9980;
  44. proxy_set_header Host $http_host;
  45. proxy_ssl_verify off;
  46. }
  47.  
  48.  
  49. # WOPI discovery URL
  50. location ^~ /hosting/discovery {
  51. proxy_pass https://192.168.0.100:9980;
  52. proxy_set_header Host $http_host;
  53. proxy_ssl_verify off;
  54.  
  55. # WebSocket support
  56. proxy_http_version 1.1;
  57. proxy_set_header Upgrade $http_upgrade;
  58. proxy_set_header Connection "upgrade";
  59. }
  60.  
  61. # Main websocket
  62. location ~ /lool/(.*)/ws$ {
  63. proxy_pass https://192.168.0.100:9980;
  64. proxy_set_header Upgrade $http_upgrade;
  65. proxy_set_header Connection "Upgrade";
  66. proxy_set_header Host $http_host;
  67. proxy_read_timeout 36000s;
  68. proxy_ssl_verify off;
  69. # WebSocket support
  70. proxy_http_version 1.1;
  71. proxy_set_header Upgrade $http_upgrade;
  72. proxy_set_header Connection "upgrade";
  73.  
  74. }
  75. # Admin Console websocket
  76. location ^~ /lool/adminws {
  77. proxy_pass http://192.168.0.100:9980;
  78. proxy_set_header Upgrade $http_upgrade;
  79. proxy_set_header Connection "Upgrade";
  80. proxy_set_header Host $http_host;
  81. proxy_read_timeout 36000s;
  82. proxy_ssl_verify off;
  83. # WebSocket support
  84. proxy_http_version 1.1;
  85. proxy_set_header Upgrade $http_upgrade;
  86. proxy_set_header Connection "upgrade";
  87.  
  88. }
  89.  
  90. # download, presentation and image upload
  91. location ^~ /lool {
  92. proxy_pass https://192.168.0.100:9980;
  93. proxy_set_header Host $http_host;
  94. proxy_ssl_verify off;
  95. # WebSocket support
  96. proxy_http_version 1.1;
  97. proxy_set_header Upgrade $http_upgrade;
  98. proxy_set_header Connection "upgrade";
  99.  
  100. }
  101.  
  102. location / {
  103. proxy_pass https://192.168.0.100:9980;
  104. proxy_set_header Host $http_host;
  105. proxy_ssl_verify off;
  106.  
  107. # WebSocket support
  108. proxy_http_version 1.1;
  109. proxy_set_header Upgrade $http_upgrade;
  110. proxy_set_header Connection "upgrade";
  111. }
  112.  
  113.  
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement