0

I installed Baikal 0.4.5 to my new Debian server with Nginx and PHP 5.6. Past installations of Baikal completed without any problems. Unfortunately now I can't connect with Carddav on Android (https://example.com:443/baikal/html/dav.php/principals/username/default). The generated errors assume that a directory is missing?

For your info, the web interface is working well. By visiting https://example.com/baikal/html/admin/ I'm be able to login. At /baikal/html/card.php the same.

Acces:

my_ip - - [06/Aug/2016:16:27:16 +0200] "PROPFIND /baikal/html/dav.php/principals/username/default/ HTTP/1.1" 207 312 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"
my_ip - - [06/Aug/2016:16:27:16 +0200] "PROPFIND /baikal/html/dav.php/ HTTP/1.1" 207 266 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"
my_ip - - [06/Aug/2016:16:27:16 +0200] "PROPFIND /.well-known/carddav HTTP/1.1" 302 154 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"
my_ip - - [06/Aug/2016:16:27:16 +0200] "PROPFIND /baikal/html/dav.php HTTP/1.1" 401 1806 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"
my_ip - username [06/Aug/2016:16:27:16 +0200] "PROPFIND /baikal/html/dav.php HTTP/1.1" 207 615 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"
my_ip - - [06/Aug/2016:16:27:16 +0200] "PROPFIND /baikal/html/dav.php/principals/username/ HTTP/1.1" 207 306 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"
my_ip - - [06/Aug/2016:16:27:16 +0200] "PROPFIND /baikal/html/dav.php/principals/username/default/ HTTP/1.1" 207 312 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"
my_ip - - [06/Aug/2016:16:27:16 +0200] "PROPFIND /baikal/html/dav.php/principals/username/default/ HTTP/1.1" 207 312 "-" "CardDAV-Sync free/0.4.20.1 (Telephone; Tel_type; Android 5.1.1; Lang; org.dmfs.carddav.sync/141)"

Errors:

2016/08/06 16:27:16 [alert] 28415#0: *22 dav_ext stat failed on '/var/www/example.com/web/baikal/html/dav.php/principals/username/default/' (20: Not a directory), client: 85.144.105.229, server: example.com, request: "PROPFIND /baikal/html/dav.php/principals/username/default/ HTTP/1.1", host: "example.com:443"
2016/08/06 16:27:16 [alert] 28415#0: *22 dav_ext stat failed on '/var/www/example.com/web/baikal/html/dav.php/' (20: Not a directory), client: 85.144.105.229, server: example.com, request: "PROPFIND /baikal/html/dav.php/ HTTP/1.1", host: "example.com:443"
2016/08/06 16:27:16 [alert] 28415#0: *23 dav_ext stat failed on '/var/www/example.com/web/baikal/html/dav.php/principals/username/' (20: Not a directory), client: 85.144.105.229, server: example.com, request: "PROPFIND /baikal/html/dav.php/principals/username/ HTTP/1.1", host: "example.com"
2016/08/06 16:27:16 [alert] 28415#0: *26 dav_ext stat failed on '/var/www/example.com/web/baikal/html/dav.php/principals/username/default/' (20: Not a directory), client: 85.144.105.229, server: example.com, request: "PROPFIND /baikal/html/dav.php/principals/username/default/ HTTP/1.1", host: "example.com:443"
2016/08/06 16:27:16 [alert] 28415#0: *26 dav_ext stat failed on '/var/www/example.com/web/baikal/html/dav.php/principals/username/default/' (20: Not a directory), client: 85.144.105.229, server: example.com, request: "PROPFIND /baikal/html/dav.php/principals/username/default/ HTTP/1.1", host: "example.com:443"

Configuration of Baikal in vhost:

rewrite ^/.well-known/caldav /baikal/html/dav.php redirect;
rewrite ^/.well-known/carddav /baikal/html/dav.php redirect;

dav_methods     PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;

Thanks in advance!

Bredje
  • 1
  • You are missing the configuration required for Baikal friendly URL to work. You need to check what is the URL rewriting required on the webserver to make it work properly. – Tero Kilkanen Aug 06 '16 at 15:10
  • Thanks for your comment! It led to the solution for my situation. – Bredje Aug 08 '16 at 19:42

1 Answers1

0

Thanks to Tero Kilkanen I was able to solve the problem. It was just a problem in the file configuration. The old situation:

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_index index.php;
    include /etc/nginx/fastcgi_params;
    fastcgi_split_path_info  ^(.+\.php)(.*)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

The new and working situation:

location ~ ^(.+?\.php)(/.*)?$ {
    try_files $uri =404;
    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include /etc/nginx/fastcgi_params;
}
Bredje
  • 1