Thanks Peter for this reply, that greatly helped me, and now it works !!!

The exact vhost is here (just changed the domain):

<VirtualHost *:443>
  Include                /etc/ssl/services/apache2_mail.domain.com
  ServerName            dav.domain.com
CustomLog /var/log/apache2/domain.com/dav_access.ssl.log combined_with_deflate_ratio
  ErrorLog            /var/log/apache2/domain.com/dav_error.ssl.log

  RewriteEngine On
  RewriteRule ^/principals/users/(.*)$ /proxy/$1 [PT]
  ProxyPassInterpolateEnv On
  ProxyPreserveHost On
  ProxyPass /proxy http://127.0.0.1:20000/SOGo/dav/ interpolate
  ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
  ProxyPass / http://127.0.0.1:20000/SOGo/dav/ interpolate

<Proxy http://127.0.0.1:20000/SOGo>
    RequestHeader set "x-webobjects-server-port" "443"
    RequestHeader set "x-webobjects-server-name" "dav.domain.com"
    RequestHeader set "x-webobjects-server-url" "https://dav.domain.com";
    RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" %{REMOTE_HOST}e env=REMOTE_HOST
    AddDefaultCharset UTF-8
    Order allow,deny
    Allow from all
</Proxy>
  RewriteEngine On
  RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT]
</VirtualHost>

In the iphone I set:
server: dav.domain.com (i.e not https://dav.domain.com:443)

The iphone then discovers automatically the path to contacts.
Iphone version is 4.3. Did not have time to see if it's working with 4.3.3 as well but I hope so...

Best regards
--
Bruno


On 11-06-22 07:10 AM, Peter Zieseniss wrote:
Hi Bruno,

i feel responsible for this; that was a config that /did not/ work with the iPhone..

However, if you have access to your server's DNS, just add an A record for a subdomain, ex:
dav.domain.com <http://dav.domain.com>


Then create a virtual host the same way you did for the last one, and use the following:

[cut]

RewriteEngine On
RewriteRule ^/principals/users/(.*)$ /proxy/$1 [PT]
ProxyPassInterpolateEnv On
ProxyPreserveHost On
ProxyPass /proxy http://127.0.0.1:20000/SOGo/dav/ interpolate
ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
ProxyPass / http://127.0.0.1:20000/SOGo/dav/ interpolate

<Proxy http://127.0.0.1:20000/SOGo>
  RequestHeader set "x-webobjects-server-port" "443"
  RequestHeader set "x-webobjects-server-name" "dav.domain.com"
  RequestHeader set "x-webobjects-server-url" "https://dav.domain.com";
  RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" %{REMOTE_HOST}e env=REMOTE_HOST
  AddDefaultCharset UTF-8
  Order allow,deny
  Allow from all
</Proxy>
RewriteEngine On
RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT]

[cut]





Note that when you enter the server address in iOS make sure to include https and :443 like the following
https://dav.domain.com:443


it works without a hitch on everything!!!
(Thanks to Mark Czardybon)


I sincerely hope this helps!
Be well,
Peter


On Jun 21, 2011, at 3:59 PM, Bruno Leon wrote:

Hello,

I've been trying to make carddav sync work with an iphone for two days without success,
so I come to this list (where I read all related post already as well)

I followed the manual and configured the additional vhost exactly as stated (see attached file),
but the iphone won't sync anything.

Versions
OS: Ubuntu 10.04
Sogo: 1.3.7a
Iphone 4.3 (didnt see the minor version)

To be noted is that I'm using emails as login. I've seen issues with that and tried to replace @ with %40 with no more luck.

I see the request reach the server, because setting a wrong username fails with SOGoDAVAuthenticator]> tried wrong password for user '[email protected] <mailto:%[email protected]>'!

With a valid user I don't have such message. The Iphone accepts the account but nothing happens.
The sogo log is below:

127.0.0.1 - - [20/Jun/2011:21:53:25 GMT] "OPTIONS /SOGo/dav/.well-known/carddav HTTP/1.1" 404 43/0 0.004 - - 0 127.0.0.1 - - [20/Jun/2011:21:53:25 GMT] "OPTIONS /SOGo/dav/ HTTP/1.1" 401 0/0 0.003 - - 0 2011-06-20 21:53:26.182 sogod[2551] -[WEClientCapabilities initWithRequest:]: Unknown WebClient: user-agent='DataAccess/1.0 (8F190)' 127.0.0.1 - - [20/Jun/2011:21:53:26 GMT] "OPTIONS /SOGo/dav/ HTTP/1.1" 200 0/0 0.014 - - 0 Jun 20 21:53:26 sogod [2551]: [WARN] |SOGo| tried to access undefined KVC key: 'davPrincipalURL' 2011-06-20 21:53:26.343 sogod[2551] -[WEClientCapabilities initWithRequest:]: Unknown WebClient: user-agent='DataAccess/1.0 (8F190)' 127.0.0.1 - - [20/Jun/2011:21:53:26 GMT] "PROPFIND /SOGo/dav/ HTTP/1.1" 207 476/181 0.024 - - 0

Is it normal that I get a 404 at first ?

Also, I tried to access the sogo.example.com:8843 url with konqueror wich support webdav, and I managed to login.
What is shows me is a folder "dav". It is empty though.
If I then add [email protected] <mailto:[email protected]> to the url, I have a list of folders: Mail, Contacts, Calendar, [email protected] <mailto:[email protected]>

This tend to show that sogo is handling the request but I'm stuck there.
Any help would be greatly appreciated.

--
Bruno Leon

--
[email protected] <mailto:[email protected]>
https://inverse.ca/sogo/lists<sogo8843.txt>


--

"My candle burns at both ends;
It will not last the night;
But ah, my foes, and oh, my friends
It gives a lovely light!"
 — Edna St. Vincent Millay

--

Peter Zieseniss
Principal
http://www.zconsulting.net
[email protected] <mailto:[email protected]>


--
[email protected]
https://inverse.ca/sogo/lists

Reply via email to