Просмотр исходного кода

Initial Commit

Files required for mail web app, autoconfig, and webdav and webcal to work by handing connection off to server.
kparker 7 месяцев назад
Родитель
Сommit
be077781ca
3 измененных файлов с 99 добавлено и 0 удалено
  1. 33 0
      autoconfig.conf
  2. 37 0
      concise-it.com.conf
  3. 29 0
      mailserver.conf

+ 33 - 0
autoconfig.conf

@@ -0,0 +1,33 @@
+server {
+    server_name autoconfig.concise-it.com autodiscover.concise-it.com;
+
+    location / {
+        proxy_pass https://192.168.2.7/mail/config-v1.1.xml;
+        proxy_set_header Host $host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_set_header X-Forwarded-Proto http;
+
+        proxy_ssl_verify off;
+    }
+
+
+
+    listen 443 ssl; # managed by Certbot
+    ssl_certificate /etc/letsencrypt/live/autoconfig.concise-it.com/fullchain.pem; # managed by Certbot
+    ssl_certificate_key /etc/letsencrypt/live/autoconfig.concise-it.com/privkey.pem; # managed by Certbot
+    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
+    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
+
+
+}
+server {
+    listen 80;
+    server_name autoconfig.concise-it.com autodiscover.concise-it.com;
+
+    location / {
+        return 301 https://$host$request_uri;
+       }
+
+
+}

+ 37 - 0
concise-it.com.conf

@@ -0,0 +1,37 @@
+server {
+    listen 443 ssl;
+    server_name concise-it.com;
+
+    ssl_certificate /etc/letsencrypt/live/concise-it.com/fullchain.pem;
+    ssl_certificate_key /etc/letsencrypt/live/concise-it.com/privkey.pem;
+    include /etc/letsencrypt/options-ssl-nginx.conf;
+    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
+
+    location /.well-known/acme-challenge/ {
+        root /var/www/html;
+    }
+
+    # Redirect CalDAV and CardDAV to SOGo
+    location = /.well-known/caldav {
+        return 301 https://mailcow.conciseit.net/SOGo/dav/;
+    }
+
+    location = /.well-known/carddav {
+        return 301 https://mailcow.conciseit.net/SOGo/dav/;
+    }
+
+    location / {
+        return 404;
+    }
+}
+
+server {
+    listen 80;
+    server_name concise-it.com;
+
+    if ($host = concise-it.com) {
+        return 301 https://$host$request_uri;
+    }
+
+    return 404;
+}

+ 29 - 0
mailserver.conf

@@ -0,0 +1,29 @@
+server {
+    listen 80;
+    server_name mailcow.conciseit.net;
+
+    # Redirect HTTP to HTTPS
+    location / {
+        return 301 https://$host$request_uri;
+    }
+}
+
+server {
+    listen 443 ssl;
+    server_name mailcow.conciseit.net;
+
+    ssl_certificate /etc/letsencrypt/live/mailcow.conciseit.net/fullchain.pem;
+    ssl_certificate_key /etc/letsencrypt/live/mailcow.conciseit.net/privkey.pem;
+    include /etc/letsencrypt/options-ssl-nginx.conf;
+    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
+
+    location / {
+        proxy_pass https://192.168.2.7;
+        proxy_set_header Host $host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_set_header X-Forwarded-Proto $scheme;
+
+        proxy_ssl_verify off;
+    }
+}