laravel-sabre
laravel-sabre copied to clipboard
how to setup DAV in subdomain?
I want to access dav server at subdomain, but it is not clear how to setup it
in config I have this
'domain' => 'dav',
'path' => '',
In DNS I setup A record dav.mydomain.com
pointing to my IP. But I cannot understand how to setup nginx config.
For example I have working config for baikal server. Here root is /var/www/baikal/html
. Which root should I use for laravel-sabre? Public folder of laravel doesn't work, because at dav.mydomain.com
, I just see laravel homepage, not sabre homepage
server {
server_name dav.lan baikal.lan dav.mydomain2.com baikal.mydomain2.com;
root /var/www/baikal/html;
index index.php;
rewrite ^/.well-known/caldav /dav.php redirect;
rewrite ^/.well-known/carddav /dav.php redirect;
charset utf-8;
location ~ /(\.ht|Core|Specific|config) {
deny all;
return 404;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
}