etc-configs/nginx/conf.d/mail.zzls.xyz.conf
2023-12-21 16:06:15 -03:00

46 lines
1.1 KiB
Text

server {
access_log /var/log/nginx/mail.zzls.xyz.log combined;
error_log /var/log/nginx/mail.zzls.xyz.error;
root /var/www/mail;
index index.html;
server_name mail.zzls.xyz;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location ^~ /baikal {
root /opt/baikal/html;
index index.php;
if (!-e $request_filename) { rewrite ^ /baikal/index.php last; }
rewrite ^/.well-known/caldav /dav.php redirect;
rewrite ^/.well-known/carddav /dav.php redirect;
location ~ /(\.ht|Core|Specific|config) {
deny all;
return 404;
}
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
try_files $uri =404;
include fastcgi.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
# QUIC
include configs/http3.conf;
listen 443 ssl
http2 on;
include configs/ssl.conf;
}
server {
if ($host = mail.zzls.xyz) {
return 301 https://$host$request_uri;
}
server_name mail.zzls.xyz;
listen 80;
}