Advertisement
trupsalms

Untitled

May 17th, 2022
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. # This file was automatically installed on 2022-05-17T03:53:45.952096
  2. upstream modoboa {
  3. server unix:/run/uwsgi/app/modoboa_instance/socket fail_timeout=0;
  4. }
  5.  
  6. server {
  7. listen 80;
  8. listen [::]:80;
  9. server_name mail.tekexample.com;
  10. rewrite ^ https://$server_name$request_uri? permanent;
  11. }
  12.  
  13. server {
  14. listen 443 ssl;
  15. listen [::]:443 ssl;
  16. server_name mail.tekexample.com;
  17. root /srv/modoboa/instance;
  18.  
  19. ssl_certificate /etc/letsencrypt/live/mail.tekexample.com/fullchain.pem;
  20. ssl_certificate_key /etc/letsencrypt/live/mail.tekexample.com/privkey.pem;
  21. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  22. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
  23. ssl_prefer_server_ciphers on;
  24. ssl_session_cache shared:SSL:10m;
  25. ssl_verify_depth 3;
  26. ssl_dhparam /etc/nginx/dhparam.pem;
  27.  
  28. client_max_body_size 10M;
  29.  
  30. access_log /var/log/nginx/mail.tekexample.com-access.log;
  31. error_log /var/log/nginx/mail.tekexample.com-error.log;
  32.  
  33. location /sitestatic/ {
  34. try_files $uri $uri/ =404;
  35. }
  36.  
  37. location /media/ {
  38. try_files $uri $uri/ =404;
  39. }
  40.  
  41. location ^~ /new-admin {
  42. alias /srv/modoboa/instance/frontend/;
  43. index index.html;
  44.  
  45. expires -1;
  46. add_header Pragma "no-cache";
  47. add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
  48.  
  49. try_files $uri $uri/ /index.html = 404;
  50. }
  51.  
  52. location / {
  53. include uwsgi_params;
  54. uwsgi_param UWSGI_SCRIPT instance.wsgi:application;
  55. uwsgi_pass modoboa;
  56. }
  57.  
  58. location ~* ^/autodiscover/autodiscover.xml {
  59. include uwsgi_params;
  60. uwsgi_pass automx;
  61. }
  62. location /mobileconfig {
  63. include uwsgi_params;
  64. uwsgi_pass automx;
  65. }
  66.  
  67. location /radicale/ {
  68. proxy_pass http://localhost:5232/; # The / is important!
  69. proxy_set_header X-Script-Name /radicale;
  70. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  71. proxy_pass_header Authorization;
  72. }
  73.  
  74. }
  75.  
  76.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement