etc-configs/nginx/conf.d/dav.zzls.xyz.conf
2024-01-14 04:03:37 -03:00

46 lines
980 B
Text

server {
access_log /var/log/nginx/dav.access.log;
error_log /var/log/nginx/dav.error.log;
server_name dav.zzls.xyz dav.nadeko.net;
root /opt/baikal/html;
index index.php;
include configs/general.conf;
include configs/security.conf;
rewrite ^/.well-known/caldav /dav redirect;
rewrite ^/.well-known/carddav /dav redirect;
charset utf-8;
location ~ /(\.ht|Core|Specific|config) {
deny all;
return 404;
}
location ~ ^(.+\.php)(.*)$ {
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass php-fpm;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
listen 443 ssl;
http2 on;
}
server {
set $x "";
if ($host = dav.zzls.xyz) {
set $x 1;
}
if ($host = dav.nadeko.net) {
set $x 1;
}
if ($x = 1) {
return 301 https://$host$request_uri;
}
listen 80;
server_name dav.zzls.xyz dav.nadeko.net;
}