laravel-sabre icon indicating copy to clipboard operation
laravel-sabre copied to clipboard

how to setup DAV in subdomain?

Open schel4ok opened this issue 2 years ago • 0 comments

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;
    }
}

schel4ok avatar May 06 '22 15:05 schel4ok