43 lines
954 B
Text
43 lines
954 B
Text
server {
|
|
access_log /var/log/nginx/dav.access.log;
|
|
error_log /var/log/nginx/dav.error.log;
|
|
server_name dav.zzls.xyz;
|
|
include configs/general.conf;
|
|
root /opt/baikal/html;
|
|
index index.php
|
|
|
|
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 unix:/run/php/php8.2-fpm.sock;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
}
|
|
|
|
# CSP + Security Headers
|
|
include configs/security.conf;
|
|
include configs/ssl.conf;
|
|
listen 443 ssl;
|
|
listen 443 quic;
|
|
http2 on;
|
|
|
|
}
|
|
|
|
server {
|
|
if ($host = dav.zzls.xyz) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
listen 80;
|
|
server_name dav.zzls.xyz;
|
|
}
|