Skip to content

how to setup DAV in subdomain? #126

@schel4ok

Description

@schel4ok

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions