Files
linuxiarz_vps_angie/sites-available/webmail.linuxiarz.pl.conf
2025-11-16 23:45:16 +01:00

94 lines
2.1 KiB
Plaintext

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.linuxiarz.pl;
set $base /var/www/webmail;
root $base;
include config/wildcard.conf;
include config/security_roundcube.conf;
# restrict methods
if ($request_method !~ ^(GET|POST)$) {
return '405';
}
# logging
access_log /var/log/angie/webmail.linuxiarz.pl.access.log;
error_log /var/log/angie/webmail.linuxiarz.pl.error.log warn;
status_zone webmail.linuxiarz.pl;
# index.php
index index.php;
location / {
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 with PATH_INFO support
location ~ \.php(?:$|/) {
include config/php_fastcgi_webmail.conf;
}
}
# HTTP redirect
server {
listen 80;
server_name webmail.linuxiarz.pl poczta.linuxiarz.pl poczta.gru.one.pl;
add_header Alt-Svc 'h3=":443"; ma=86400';
location / {
return 301 https://webmail.linuxiarz.pl$request_uri;
}
}
# Other redirects
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 poczta.linuxiarz.pl;
include config/wildcard.conf;
# security
include config/security.conf;
# restrict methods
if ($request_method !~ ^(GET)$) {
return '405';
}
location / {
return 301 https://webmail.linuxiarz.pl$request_uri;
}
}