[horde] Dynamic view Horde with apache and php-fpm not working
Arjen de Korte
arjen+horde at de-korte.org
Mon Feb 16 11:29:22 UTC 2015
Citeren Jos van der Woude <jos at veerkade.com>:
> Quoting Jan Schneider <jan at horde.org>:
>
>> Zitat von Michael J Rubinsky <mrubinsk at horde.org>:
>>
>>> Quoting Jos van der Woude <jos at veerkade.com>:
>>>
>>>> Hi all,
>>>>
>>>> A few days ago I fedup-ed my horde groupware 5.2.5 server to Fedora 21
>>>> and
>>>> I am now using apache with php-fpm.
>>>>
>>>> The new service php-fpm is running, the relevant proxy modules are
>>>> loaded
>>>> in Apache.
>>>>
>>>> and I am having the following problem:
>>>>
>>>> Horde dynamic view does not work properly:
>>>> I am seeing the count of recent, unread emails in the opening
>>>> portal (which means my IMAP backend is set up correctly) but am
>>>> getting the error ("Error when communicating with the server") when
>>>> looking for the complete email list in IMP's dynamic mode.
>>>>
>>>> The relevant error is:
>>>> [Sun Feb 15 16:08:09.815854 2015] [proxy_fcgi:error] AH01071: Got error
>>>> 'Unable to open primary script: redirect:/rampage.php
>>>> (No such file or directory)\n', referer:
>>>> .../horde/imp/dynamic.php?page=mailbox
>>>>
>>>> Obviously the file rampage.php is indeed present in the main horde
>>>> directory and accessible to the apache owner.
>>>>
>>>> In basic mode all is working just fine; smartphone access using
>>>> ActiveSync
>>>> is fine too.
>>>>
>>>> From an earlier post the suggestion came there might be a catchall in
>>>> the
>>>> Apache config that stops it from responding to the ajax request for the
>>>> folder trees & list of emails.
>>>>
>>>> Just the same happens with the calendar view.
>>>>
>>>> I do not know how to fix this.
>>>>
>>>> Contents of /etc/httpd/conf.d/php.conf:
>>>> #
>>>> # The following lines prevent .user.ini files from being viewed by Web
>>>> clients.
>>>> #
>>>> <Files ".user.ini">
>>>> Require all denied
>>>> </Files>
>>>>
>>>> #
>>>> # Allow php to handle Multiviews
>>>> #
>>>> AddType text/html .php
>>>>
>>>> #
>>>> # Add index.php to the list of files that will be served as directory
>>>> # indexes.
>>>> #
>>>> DirectoryIndex index.php
>>>>
>>>> # Pass PHP scripts to PHP-FPM
>>>> <FilesMatch \.php$>
>>>> SetHandler "proxy:fcgi://127.0.0.1:9000"
>>>> </FilesMatch>
>>>> ProxyErrorOverride On
>>>>
>>>> Contents of .htaccess in the horde directory
>>>> # .htaccess
>>>> allow from all
>>>>
>>>> <IfModule mod_rewrite.c>
>>>> RewriteEngine On
>>>> RewriteBase /var/www/html/mail/horde
>>>> RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
>>>> RewriteCond %{REQUEST_FILENAME} !-d
>>>> RewriteCond %{REQUEST_FILENAME} !-f
>>>> RewriteRule ^(.*)$ rampage.php [QSA,L]
>>>> </IfModule>
>>>>
>>>> Relevant contents of /etc/httpd/conf/httpd.conf
>>>> ...
>>>> <VirtualHost *:443>
>>>> ...
>>>> DocumentRoot "/var/www/html/mail/horde"
>>>> ...
>>>> Alias /horde /var/www/html/mail/horde/
>>>> Alias /Microsoft-Server-ActiveSync
>>>> /var/www/html/mail/horde/rpc.php
>>>> Alias /Autodiscover/Autodiscover.xml
>>>> /var/www/html/mail/horde/rpc.php
>>>>
>>>> <Directory "/var/www/html/mail/horde">
>>>> # enable the .htaccess rewrites
>>>> AllowOverride All
>>>> Require all granted
>>>> SSLRequireSSL
>>>> </Directory>
>>>>
>>>> </VirtualHost>
>>>> ...
>>>>
>>>> Does anyone know how I can fix this problem? Any help is much
>>>> appreciated!
>>>
>>> What does your horde config look like? Sounds like maybe a webroot
>>> issue...
>>>
>>> --
>>> mike
>>> The Horde Project
>>> http://www.horde.org
>>> https://www.facebook.com/hordeproject
>>> https://www.twitter.com/hordeproject
>>
>> Is PATH_INFO enabled?
>>
>> --
>> Jan Schneider
>> The Horde Project
>> http://www.horde.org/
>> https://www.facebook.com/hordeproject
>>
>
> Hi Mike and Jan,
>
> Both fileroot and webroot are untouched in registry.local.php.
> Messing with these variables did not work for me.
>
> Setting the AcceptPathInfo apache directive to 'on' did not change
> anything.
>
> In fact the identical config worked previously. The only difference is in
> the php.conf
> file where the handler is now set to work with php-fpm using
> 127.0.0.1:9000.
> The php-fpm service is running.
>
> So, what else can it be?
I use a slightly different configuration to proxy requests to PHP-FPM
here (which works just fine):
<IfModule mod_proxy_fcgi.c>
<Proxy fcgi://127.0.0.1:9000>
# Some headers won't be passed through to the proxy, set them in the
environment
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
SetEnvIf Ms-Asprotocolversion "(.*)" HTTP_MS_ASPROTOCOLVERSION=$1
SetEnvIf X-Ms-Policykey "(.*)" HTTP_X_MS_POLICYKEY=$1
# ActiveSync requires connections to not timeout for at least an hour
ProxySet timeout=3600
</Proxy>
# Pass all .php files through the proxy to PHP-FPM
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/www/htdocs/$1
</IfModule>
Note that you will need to modify the '/srv/www/htdocs' part to match
the DocumentRoot value in your installation.
--
This message was sent from a mailinglist subscription address.
For off-list replies, you must remove the address extension.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 11647 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20150216/a3347116/attachment.bin>
More information about the horde
mailing list