67 lines
1.4 KiB
Plaintext
67 lines
1.4 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 r.linuxiarz.pl;
|
|
set $base /var/www/rainloop;
|
|
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/r.linuxiarz.pl.access.log;
|
|
error_log /var/log/angie/r.linuxiarz.pl.error.log warn;
|
|
|
|
# index.php
|
|
index index.php;
|
|
|
|
# index.php fallback
|
|
location / {
|
|
try_files $uri $uri/ index.php;
|
|
}
|
|
|
|
location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
|
|
deny all;
|
|
error_page 403 =404 / ;
|
|
}
|
|
|
|
location ~ ^/(data)/ {
|
|
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;
|
|
}
|
|
}
|
|
|
|
# HTTP redirect
|
|
server {
|
|
listen 80;
|
|
server_name r.linuxiarz.pl;
|
|
add_header Alt-Svc 'h3=":443"; ma=86400';
|
|
|
|
location / {
|
|
return 301 https://r.linuxiarz.pl$request_uri;
|
|
}
|
|
}
|