Re: [SOGo] CardDAV iOS5

2011-11-02 Thread Peter Zieseniss
Forget about the headache of using different ports in the Apache config and 
then trying to use them in iOS or Mac OS X

btw: i think it would be a boon if the config below could be added to the 
official documentation, you will find its original author by searching through 
this list's archive (it has been improved by several sources)



Just point all of your iOS and Mac OS devices to use:

dav.yourdomain.com:443  (even the :443 is optional!!)



And just add this to your http.d config (remember to change yourdomain.com and 
your_ip to the proper values):




VirtualHost your_ip:443
ServerName   dav.yourdomain.com443


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

Proxy http://127.0.0.1:2/SOGo
  RequestHeader set x-webobjects-server-port 443
  RequestHeader set x-webobjects-server-name dav.yourdomain.com
  RequestHeader set x-webobjects-server-url 
https://dav.yourdomain.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




i hope this helps,
Peter



On Nov 2, 2011, at 3:19 PM, André Schild wrote:

 Am 02.11.2011 15:17, schrieb Imo Graf:
 The documentation use the port 8800 and this I have configured and it don't 
 work. To configure the vhost with ssl is no the documentation left.
 
 General configuration of apache for SSL is somewhat out of the scope of this 
 list
 
 When SSLEngine is not recognized by apache, then this means you don't have 
 installed/enable the apache ssl module.
 
 André
 -- 
 users@sogo.nu
 https://inverse.ca/sogo/lists


--

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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] CardDAV iOS5

2011-11-02 Thread Peter Zieseniss
Grrr... Sorry for the 3rd re-write ;-)

i forgot the colon (:) in:
ServerName   dav.yourdomain.com:443

here is the whole thing again (sorry but Apple's Mail adds the links 
automatically):
PS: it really is just that easy!!!







VirtualHost your_ip:443
ServerName   dav.yourdomain.com:443


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

Proxy http://127.0.0.1:2/SOGo
  RequestHeader set x-webobjects-server-port 443
  RequestHeader set x-webobjects-server-name dav.yourdomain.com
  RequestHeader set x-webobjects-server-url 
https://dav.yourdomain.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






Be Well,
Peter



On Nov 2, 2011, at 3:47 PM, Peter Zieseniss wrote:

 
 Just point all of your iOS and Mac OS devices to use:
 
 dav.yourdomain.com:443  (even the :443 is optional!!)
 
 
 
 And just add this to your http.d config (remember to change yourdomain.com 
 and your_ip to the proper values):
 
 
 
 
 VirtualHost your_ip:443
   ServerName   dav.yourdomain.com443
   
   
   RewriteEngine On
   RewriteRule ^/principals/users/(.*)$ /proxy/$1 [PT]
   ProxyPassInterpolateEnv On 
   ProxyPreserveHost On
   ProxyPass /proxy http://127.0.0.1:2/SOGo/dav/ interpolate 
   ProxyPass /SOGo http://127.0.0.1:2/SOGo interpolate
   ProxyPass / http://127.0.0.1:2/SOGo/dav/ interpolate
   
   Proxy http://127.0.0.1:2/SOGo
 RequestHeader set x-webobjects-server-port 443
 RequestHeader set x-webobjects-server-name dav.yourdomain.com
 RequestHeader set x-webobjects-server-url 
 https://dav.yourdomain.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
 
 
 
 
 i hope this helps,
 Peter
 
 
 
 On Nov 2, 2011, at 3:19 PM, André Schild wrote:
 
 Am 02.11.2011 15:17, schrieb Imo Graf:
 The documentation use the port 8800 and this I have configured and it don't 
 work. To configure the vhost with ssl is no the documentation left.
 
 General configuration of apache for SSL is somewhat out of the scope of this 
 list
 
 When SSLEngine is not recognized by apache, then this means you don't have 
 installed/enable the apache ssl module.
 
 André
 -- 
 users@sogo.nu
 https://inverse.ca/sogo/lists
 
 
 --
 
 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
 pe...@zconsulting.net
 


--

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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] CardDAV iOS5

2011-11-02 Thread Peter Zieseniss
I think it would be a boon if the config below could be added to the official 
documentation, you will find its original author by searching through this 
list's archive



Point all of your iOS and Mac OS devices to use:

dav.yourdomain.com:443  (the :443 is even optional!!)



and just add this to your http.d config (remember to change yourdomain.com and 
your_ip to the proper values):




VirtualHost your_ip:443
ServerName   dav.yourdomain.com443


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

Proxy http://127.0.0.1:2/SOGo
  RequestHeader set x-webobjects-server-port 443
  RequestHeader set x-webobjects-server-name dav.yourdomain.com
  RequestHeader set x-webobjects-server-url 
https://dav.yourdomain.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








On Nov 2, 2011, at 3:19 PM, André Schild wrote:

 Am 02.11.2011 15:17, schrieb Imo Graf:
 The documentation use the port 8800 and this I have configured and it don't 
 work. To configure the vhost with ssl is no the documentation left.
 
 General configuration of apache for SSL is somewhat out of the scope of this 
 list
 
 When SSLEngine is not recognized by apache, then this means you don't have 
 installed/enable the apache ssl module.
 
 André
 -- 
 users@sogo.nu
 https://inverse.ca/sogo/lists


--

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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] Iphone Carddav

2011-06-22 Thread Peter Zieseniss
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


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:2/SOGo/dav/ interpolate 
ProxyPass /SOGo http://127.0.0.1:2/SOGo interpolate
ProxyPass / http://127.0.0.1:2/SOGo/dav/ interpolate

Proxy http://127.0.0.1:2/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 't...@example.com'!
 
 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 u...@example.com to the url, I have a list of folders: Mail, 
 Contacts, Calendar, u...@example.com
 
 This tend to show that sogo is handling the request but I'm stuck there.
 Any help would be greatly appreciated.
 
 -- 
 Bruno Leon
 
 -- 
 users@sogo.nu
 https://inverse.ca/sogo/listssogo8843.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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] Apache subdomain config for iPhone AddressBook sync

2011-06-06 Thread Peter Zieseniss
Hello Mark and All,

Your Apache config works better than i could've even dreamed!!

it works flawlessly on all Apple-branded products (MacOS+iOS) even on multiple 
virtual domains;
what's best is that there is no need for individual subdomains, and no need to 
specify any kind of server path!
(i really, really need to learn regexp!)

Thank you so very much Mark!
Be Well All!
Peter


On Jun 1, 2011, at 10:16 AM, Marek Czardybon wrote:

 Hello.
 
 Maybe this will be helpful for you :
 
 [cut]
 
 RewriteEngine On
 RewriteRule ^/principals/users/(.*)$ /proxy/$1 [PT]
 ProxyPassInterpolateEnv On 
 ProxyPreserveHost On
 ProxyPass /proxy http://127.0.0.1:2/SOGo/dav/ interpolate 
 ProxyPass /SOGo http://127.0.0.1:2/SOGo interpolate
 ProxyPass / http://127.0.0.1:2/SOGo/dav/ interpolate
 
 Proxy http://127.0.0.1:2/SOGo
   RequestHeader set x-webobjects-server-port 443
   RequestHeader set x-webobjects-server-name cal.domain.com
   RequestHeader set x-webobjects-server-url https://cal.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]
 
 I've create additional virtual server in Apache specially for iPads/iPhones. 
 This is part of my apache config for them. And it is working perfectly ... 
 Aliases and directory directives in config are the same as usual 
 
 User have to provide only hostname, user nad password. Without any additional 
 part of URL :)
 
 BR
 -- 
 mark


--

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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

[SOGo] Apache subdomain config for iPhone AddressBook sync

2011-05-31 Thread Peter Zieseniss
Hello all,

Firstly, i'd like to thank those who actively participate in helping solve all 
our problems, your help is inestimably welcome!

That said, i've got an Apache-related riddle...

For reasons that are good and, mostly, bad, i want to avoid the funambol 
approach, both server- and client-side.
i have few enough users that i can make a virtual domain for each one following 
this logic:

username.sogouser.domain.com:8843

the idea being that the above address would actually lead to:

domain.com:8843/SOGo/dav/username/

That way, i could have the users enter the subdomain address form in iCal, 
AddressBook (Mac), iPhone (Cal-and-Card-dav) without ever worrying about having 
to enter the server path (the /SOGo/dav/username/ part that comes after 
domain.com) since half of these apps don't support it...

The problem is that i can't get it to work...

Below is my VirtualDomain config, the fact is, i've no clue what the hell i'm 
doing...(commented lines were tried but failed).

Any help, whatsoever, would be immensely appreciated!
Be Well All!
Peter



VirtualHost 64.6.243.32:8843
ServerName   username.sogouser.domain.com:8843
ServerAlias domain.com username.sogouser.domain.com 
username.sogouser.domain.com:8843 domain.com:8843
ServerAdmin  usern...@domain.com

Alias /SOGo.woa/WebServerResources/ 
/usr/GNUstep/System/Library/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ 
/usr/GNUstep/System/Library/SOGo/WebServerResources/
AliasMatch 
/SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) 
/usr/GNUstep/System/Library/SOGo/$1.SOGo/Resources/$2

LocationMatch 
^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*\.(jpg|png|gif|css|js)
SetHandler default-handler
/LocationMatch

ProxyPass / http://127.0.0.1:2/SOGo/dav/username/ 
interpolate
ProxyPass /principals 
https://127.0.0.1:2/SOGo/dav/username/ interpolate
ProxyPass /SOGo https://127.0.0.1:2/SOGo interpolate

Proxy http://127.0.0.1:2/SOGo/dav/username/
## adjust the following to your configuration
  #RequestHeader set x-webobjects-server-port 8843
  #RequestHeader set x-webobjects-server-name 
domain.com/SOGo/dav/username/
  #RequestHeader set x-webobjects-server-url 
https://domain.com/SOGo/dav/username/;
  ## or
  ## i've even seen this somewhere:
  #RequestHeader set x-webobjects-server-url 
https://;

## When using proxy-side autentication, you need to 
uncomment and
## adjust the following line:
#  RequestHeader set x-webobjects-remote-user 
%{REMOTE_USER}e

#  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

SSLEngine on
SSLVerifyClient none
SSLCertificateFile /usr/local/psa/var/certificates/certTyA5848

/VirtualHost




--

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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

[SOGo] Apple Address Book, please help

2011-04-18 Thread Peter Zieseniss
Hello,

Has anyone been able to get Address Book (from 10.6.7 --or any other--) to work 
with SOGo?
Everything else works fine, but i can't get AddressBook to connect to SOGo..

Here is my virtual host config; also, i tried adding an SRV record to my DNS, 
and, of course, i entered the proper address 
(https://zconsulting.net:8800/SOGo/dav/sogo) in the Configuration.plist file...

Please help!


VirtualHost 64.6.243.32:8800
ServerName   zconsulting.net:8800
ServerAlias zconsulting.net
ServerAdmin  pe...@zconsulting.net


RewriteEngine Off
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPassInterpolateEnv On
ProxyPass /principals http://127.0.0.1:2/SOGo/dav/ 
interpolate
ProxyPass /SOGo http://127.0.0.1:2/SOGo interpolate
ProxyPass / http://127.0.0.1:2/SOGo/dav/ interpolate
# i tried these below just for kicks..  
ProxyPass /SOGo/dav/sogo/ http://127.0.0.1:2/SOGo/dav/sogo/ 
interpolate
ProxyPass /directory/ http://127.0.0.1:2/SOGo/dav/sogo/ 
interpolate
Location /
Order allow,deny
Allow from all
/Location
Proxy http://127.0.0.1:2
RequestHeader set x-webobjects-server-port 8800
RequestHeader set x-webobjects-server-name 
zconsulting.net:8800
RequestHeader set x-webobjects-server-url 
https://zconsulting.net:8800;
RequestHeader set x-webobjects-server-protocol HTTP/1.0
RequestHeader set x-webobjects-remote-host 127.0.0.1
AddDefaultCharset UTF-8
/Proxy
/VirtualHost



--

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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] Apple Address Book with SOGo

2011-04-18 Thread Peter Zieseniss
OMG!!

it actually works now!!!
except is it normal that the address book is read-only?

i'm so sorry to have bothered all of you with this
i'll write up a mac-specific checklist of the tweaks needed from a fresh 
install and post it on my site...

(it's listening on 8800 because il opened all kinds of ports )

On Apr 18, 2011, at 6:00 PM, Jeff Folk wrote:

 On Apr 18, 2011, at 10:54 AM, Peter Zieseniss wrote:
 
 Holy moly!
 
 Thank you for your prompt response Jeff!
 i actually just found a note about this as i got your email, so i added 
 directives to listen on 8800 and 8843
 
 Should respond now...
 
 Yeah...  ;-D
 
 I'm using SSL on port 8843 myself. Works a treat, but getting the SSL engine 
 working in the apache config was a little tricky.
 
 It looks like even port 8800 on your server is speaking SSL, but I get a 
 login using a web browser. I think if you change your config to use port 8843 
 your Addressbook application will be able to connect. Port 8800 is supposed 
 to be non-SSL.
 
 Jeff
 
 -- 
 users@sogo.nu
 https://inverse.ca/sogo/lists


--

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
pe...@zconsulting.net

-- 
users@sogo.nu
https://inverse.ca/sogo/lists