当mod_rewrite和fcgi一起使用时,Apache退出信号出现分段错误

我使用Ubuntu 15.04,Apache / 2.4.10。 我启用了mod_rewrite和mod_proxy_fcgi。

我的fcgi的apacheconfiguration是:

ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/myapp/$1 

当我请求http://127.0.0.1/index.php它完美的作品

我添加了这样一个重写规则:

 RewriteRule ^foo index.php?country=de&handle=cleanmaster&offer=3 

现在,当我请求http://127.0.0.1/foo Apache崩溃与此错误:

 [pid 4242:tid 140535432255360] AH00051: child pid 4539 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump 

如果我看看核心转储,这是堆栈跟踪:

 Program terminated with signal SIGSEGV, Segmentation fault. #0 strlen () at ../sysdeps/x86_64/strlen.S:106 warning: Source file is more recent than executable. 106 movdqu (%rax), %xmm12 (gdb) where #0 strlen () at ../sysdeps/x86_64/strlen.S:106 #1 0x00007fd0f461ed37 in ap_fcgi_encoded_env_len () #2 0x00007fd0f03b328d in ?? () from /usr/lib/apache2/modules/mod_proxy_fcgi.so #3 0x00007fd0f05c0653 in proxy_run_scheme_handler () from /usr/lib/apache2/modules/mod_proxy.so #4 0x00007fd0f05c161c in ?? () from /usr/lib/apache2/modules/mod_proxy.so #5 0x00007fd0f46182a0 in ap_run_handler () #6 0x00007fd0f46187e9 in ap_invoke_handler () #7 0x00007fd0f462dfac in ap_internal_redirect () #8 0x00007fd0eff98ea2 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so #9 0x00007fd0f46182a0 in ap_run_handler () #10 0x00007fd0f46187e9 in ap_invoke_handler () #11 0x00007fd0f462e682 in ap_process_async_request () #12 0x00007fd0f462b1f0 in ?? () #13 0x00007fd0f4621b10 in ap_run_process_connection () #14 0x00007fd0f09e1b0b in ?? () from /usr/lib/apache2/modules/mod_mpm_event.so #15 0x00007fd0f3abc6aa in start_thread (arg=0x7fd0e77fe700) at pthread_create.c:333 #16 0x00007fd0f37f1eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 

顺便说一句,如果我禁用fcgi,重写规则工作正常,并显示正确的文件。 在这种情况下,它只是不经过fcgi,当然源文件被下载。 我相信重写和fcgi混合会出现问题

我们自己的问题似乎可能源于我们的厨师configuration从两个不同的来源(EPEL和IUS)安装httpd,PHP-FPM和PHP本身。

我有一个类似的问题。 结果发现,在Apache 2.4中,在启用“mod_remoteip”的同时,不能将mod_geoip选项“GeoIPScanProxyHeaders”设置为“On”。 “GeoIPScanProxyHeaders”是获取“mod_geoip”使用的客户端IP地址的设置。 相反,“mod_remoteip”应该是首选,“mod_geoip”将使用“mod_remoteip”的发现。 同时设置“GeoIPScanProxyHeaders”和“mod_remoteip”,至less在涉及到php-fpm时打破了mod_rewite。