server { listen 443 quic; listen 443 ssl; http2 on; http3 on; ssl_protocols TLSv1.3 TLSv1.2; ssl_early_data on; add_header Alt-Svc 'h3=":$server_port"; ma=86400'; server_name webmail-beta.linuxiarz.pl; set $base /var/www/webmail-beta; root $base; include config/wildcard.conf; include config/security_wp.conf; # restrict methods if ($request_method !~ ^(GET|POST)$) { return '405'; } location / { return 301 https://webmail.linuxiarz.pl$request_uri; } # logging access_log /var/log/nginx/webmail-beta.linuxiarz.pl.access.log; error_log /var/log/nginx/webmail-beta.linuxiarz.pl.error.log warn; # index.php index index.php; # index.php fallback location /x { try_files $uri $uri/ index.php; } location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ { deny all; error_page 403 =404 / ; } location ~ ^/(bin|SQL|config|temp|logs)/ { deny all; } location ~\.(ini|log|conf|MD|md|json)$ { deny all; error_page 403 =404 / ; } # additional config include config/general.conf; # handle .php location ~ \.php$ { include config/php_fastcgi_webmail.conf; } }