aboutsummaryrefslogblamecommitdiff
path: root/files/usr/local/etc/nginx/vhosts.conf.smtp_server
blob: 4b84ede214a1b0480d68682a30de374c5d1bfe11 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                 





                                                                  

                           
                                 
                                                


                                                                       


                                                
server {
  listen 443      ssl default_server;
  listen [::]:443 ssl default_server;

  http2 on;

  ssl_certificate      ${rspamd_tls_cert};
  ssl_certificate_key  ${rspamd_tls_key};

  add_header Strict-Transport-Security "max-age=63072000" always;

$(if [ -n "$rspamd_admin_users" ]; then
echo   '  auth_gss on;'
echo   "  auth_gss_keytab ${nginx_keytab};"
printf '  auth_gss_authorized_principal %s;\n' $rspamd_admin_users
fi)

  location / {
    proxy_http_version 1.1;
    proxy_set_header Host \$host;
    proxy_set_header X-Forwarded-Proto \$scheme;
$(if [ -z "$rspamd_admin_users" ]; then
echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;'
fi)
    proxy_pass http://127.0.0.1:${rspamd_port}/;
  }
}