feat(sftpgo): add TLS support and internal certificate management

This commit is contained in:
2025-05-08 22:36:47 +02:00
parent 4d4f085c3e
commit 9de7d52192
12 changed files with 285 additions and 116 deletions
@@ -1,7 +1,12 @@
server {
listen 8080;
server_name localhost;
%{ if tls ~}
listen 8443 ssl;
ssl_certificate /etc/ssl/certs/private/tls.crt;
ssl_certificate_key /etc/ssl/certs/private/tls.key;
ssl_protocols TLSv1.2 TLSv1.3;
%{ endif ~}
server_name ${fqdn};
gzip on;
gzip_comp_level 9;
gzip_types
@@ -16,18 +21,17 @@ server {
application/xml
application/rss+xml
image/svg+xml;
root /tmp/site;
%{ if custom_snippet != "" ~}
${custom_snippet}
%{ endif ~}
location / {
index index.html index.htm;
}
location ~* ^/([^/]+) {
index index.html index.htm;
error_page 404 = @error;
}
error_page 404 /404.html;
location @error {
try_files /$1/404.html /404.html =404;