[horde] ActiveSync stops working after migration from mod_php to mod_proxy_fcgi and PHP-FPM

Arjen de Korte arjen+horde at de-korte.org
Sat Jan 11 20:29:57 UTC 2014


Citeren Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting Arjen de Korte <arjen+horde at de-korte.org>:
>
>> I have migrated a (Apache 2.4) server from mod_php to  
>> mod_proxy_fcgi and PHP-FPM. This almost works, the only thing is  
>> that ActiveSync seems to have stopped working. In the webserver  
>> logs I see lots of lines like
>>
>>    192.168.1.133 - - [11/Jan/2014:12:39:33 +0100] "POST  
>> /Microsoft-Server-ActiveSync?Cmd=Sync&User=arjen&DeviceId=847CC7DCA0F0B1CF&DeviceType=Android HTTP/1.1" 401  
>> -
>>
>> After enabling ActiveSync debug logging at the same time the  
>> following is logged
>>
>>    2014-01-11T12:39:33+01:00 INFO: [12589]  
>> Horde_Core_ActiveSync_Driver::authenticate() attempt for arjen
>>    2014-01-11T12:39:33+01:00 NOTICE: Device failed to pass the user  
>> password.
>>
>> The same installation is operational again if I disable  
>> mod_proxy_fcgi and enable mod_php5, without further changes. What  
>> am I missing here
>
> http://wiki.horde.org/ActiveSync

The above doesn't mention mod_proxy_fcgi at all, which I mentioned I  
was using. It turns out that mod_proxy_fcgi (at least in Apache 2.4.6)  
doesn't pass on the authorization. Bummer. After fixing that, I also  
found out that there is a default 30 seconds timeout, which also  
doesn't go well with ActiveSync. In addition to the existing  
configurations, adding the following to the Apache configuration made  
things work again:

<IfModule mod_proxy_fcgi.c>
         SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

         <Proxy fcgi://127.0.0.1:9000>
                 ProxySet timeout=3600
         </Proxy>

         ProxyPassMatch ^/(.*\.php(/.*)?)$  
fcgi://127.0.0.1:9000/srv/www/htdocs/$1
</IfModule>

It seems that things are back in working order.



More information about the horde mailing list