diff options
| author | crupest <crupest@outlook.com> | 2024-11-04 00:16:15 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2024-11-04 00:16:15 +0800 | 
| commit | c699d400208d81430cf03b8d1fcd46a0a1eef19b (patch) | |
| tree | 749e20832dc2140ea4a51a5472ddb4f1338d0c17 /template/nginx | |
| parent | 9db9737bc653379260164d616903fcd4ed400eb5 (diff) | |
| download | crupest-c699d400208d81430cf03b8d1fcd46a0a1eef19b.tar.gz crupest-c699d400208d81430cf03b8d1fcd46a0a1eef19b.tar.bz2 crupest-c699d400208d81430cf03b8d1fcd46a0a1eef19b.zip | |
fix(roundcubemail): fix reverse prpxy.
Diffstat (limited to 'template/nginx')
| -rw-r--r-- | template/nginx/root.conf.template | 36 | ||||
| -rw-r--r-- | template/nginx/server.json | 9 | 
2 files changed, 9 insertions, 36 deletions
| diff --git a/template/nginx/root.conf.template b/template/nginx/root.conf.template index 1a32b6d..8f65b40 100644 --- a/template/nginx/root.conf.template +++ b/template/nginx/root.conf.template @@ -49,39 +49,3 @@ server {          root /srv/acme;      }  } - -# Temporary config for roundcubemail (PHP) -# TODO: Add to nginx template. - -server { -    listen 443 ssl http2; -    listen [::]:443 ssl http2; -    server_name mail.${CRUPEST_DOMAIN}; - -    index index.php index.html; -    root /srv/roundcubemail; - -    location ~ \.php$ { -        try_files $uri =404; -        fastcgi_split_path_info ^(.+\.php)(/.+)$; -        fastcgi_pass roundcubemail:9009; -        fastcgi_index index.php; -        include fastcgi_params; -        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; -        fastcgi_param PATH_INFO $fastcgi_path_info; -    } -} - -server { -    listen 80; -    listen [::]:80; -    server_name mail.${CRUPEST_DOMAIN}; - -    location / { -        return 301 https://$host$request_uri; -    } - -    location /.well-known/acme-challenge { -        root /srv/acme; -    } -} diff --git a/template/nginx/server.json b/template/nginx/server.json index a338c4f..183bd77 100644 --- a/template/nginx/server.json +++ b/template/nginx/server.json @@ -17,6 +17,11 @@              "upstream": "forgejo:3000"          },          { +            "type": "reverse-proxy", +            "subdomain": "mail", +            "upstream": "roundcubemail:80" +        }, +        {              "type": "static-file",              "subdomain": "blog",              "root": "/srv/blog" @@ -25,6 +30,10 @@              "type": "redirect",              "subdomain": "github",              "url": "https://github.com/crupest" +        }, +        { +            "type": "cert-only", +            "subdomain": "mail"          }      ]  } | 
