Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution?

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


dancom96 at gmail

Feb 28, 2012, 3:57 PM

Post #1 of 8 (2676 views)
Permalink
mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution?

Hi,

What is the correct way for configuring mod_proxy_fcgi and PHP-FPM?

This is what I have:
ProxyPass /www/ fcgi://127.0.0.1:9000/www/

All domains are setup under /www/domain.com

When I try to access domain.com/info.php however, it just shows the file as
text. (<?php info(); ?>) There are no errors in apache's error_log or
PHP-FPM's. Both are set to debug.

Thanks


mark at catseye

Mar 2, 2012, 6:16 AM

Post #2 of 8 (2632 views)
Permalink
Re: mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution? [In reply to]

On February 28, 2012 18:57 , Daniel <dancom96 [at] gmail> wrote:
> What is the correct way for configuring mod_proxy_fcgi and PHP-FPM?
>
> This is what I have:
> ProxyPass /www/ fcgi://127.0.0.1:9000/www/ <http://127.0.0.1:9000/www/>

What you have is correct. You can also put it in a <Location> block,
like this:

<Location /www/>
ProxyPass fcgi://127.0.0.1:9000/www/ <http://127.0.0.1:9000/www/>
</Location>

Or you can use a RewriteRule, like this:

RewriteRule ^/www/(.*)$ fcgi://127.0.0.1:4000/www/$1 [P]

All of the above are equivalent.


> All domains are setup under /www/domain.com <http://domain.com>
>
> When I try to access domain.com/info.php <http://domain.com/info.php>
> however, it just shows the file as text. (<?php info(); ?>) There are
> no errors in apache's error_log or PHP-FPM's. Both are set to debug.

For the ProxyPass directive you have above, http://domain.com/info.php
is not correct, and it SHOULD show you the info.php file as text. The
correct URL for the ProxyPass directive you gave is
http://domain.com/www/info.php This is because the ProxyPass directive
you gave will only proxy requests for URI paths that begin with "/www/"
(this is what the first argument to the ProxyPass directive -- or the
enclosing Location block -- controls).

If using the correct URL doesn't work, here are some more things to look at:

Make sure PHP-FPM is correctly configured to server URI paths that all
begin with "/www/". You may need to change your directory structure for
your PHP-FPM / PHP document root (which is separate from the Apache HTTP
Server document root), or change the PHP document_root config setting in
order to get the results you want.

Make sure you have PHP-FPM error logging turned on via the error_log
config item in php-fpm.conf and that you are seeing SOMETHING getting
logged there (for example, startup messages).


Test PHP-FPM independently of Apache HTTP Server to make sure that it is
working. If it is, then you know that the problem is with Apache. If
it isn't, then no amount of troubleshooting Apache will help. I
recommend setting up a script that you can manually run on your web
server machine that will send an FCGI request to PHP-FPM and display the
results:

If you want to use PHP for the script, try:
https://github.com/adoy/PHP-FastCGI-Client

If you want to use Perl (which is what I personally prefer) for the
script, try:
http://search.cpan.org/~tokuhirom/FCGI-Client-0.08/lib/FCGI/Client.pm

You should also be able to find scripts for Python or other languages by
googling "python fastcgi client" or "python fcgi client"


If you are using Apache 2.4.x (or 2.3.x) try turning up the LogLevel for
proxying to "trace" (which is more detailed than "debug") and see if
that provides any additional information as to what is -- or is not --
happening. For example, when debugging PHP-FPM issues, I use:

LogLevel info ssl:notice rewrite:trace8 proxy:trace8 proxy_fcgi:trace8


Good luck! I hope this helps.

--
Mark Montague
mark [at] catseye


dancom96 at gmail

Mar 3, 2012, 4:22 AM

Post #3 of 8 (2623 views)
Permalink
Re: mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution? [In reply to]

Thank you, I just realized that earlier, as I thought Location /www/ meant
server side.
It works, however it passes all traffic through PHP-FPM and gives a "Access
denied." message on static files, and does not allow passing variables
through the URL with the mod_rewrite method.

An alternative rewrite, RewriteRule ^/?(.*\.php)$ fcgi://
127.0.0.1:9000/www/$1 [P,L], allows static files to work, but breaks PHP
files when you try to pass variables, or even add a symbol, as like before.
(ex: info.php?)

Is there any 'fully-working' solution for PHP-FPM with Apache 2.4? None of
the methods seem to work as intended. Either static files do not work, or
variables cannot be passed.


On Fri, Mar 2, 2012 at 10:16 AM, Mark Montague <mark [at] catseye> wrote:

> On February 28, 2012 18:57 , Daniel <dancom96 [at] gmail><dancom96 [at] gmail>wrote:
>
> What is the correct way for configuring mod_proxy_fcgi and PHP-FPM?
>
> This is what I have:
> ProxyPass /www/ fcgi://127.0.0.1:9000/www/
>
>
> What you have is correct. You can also put it in a <Location> block, like
> this:
>
> <Location /www/>
> ProxyPass fcgi://127.0.0.1:9000/www/
> </Location>
>
> Or you can use a RewriteRule, like this:
>
> RewriteRule ^/www/(.*)$ fcgi://127.0.0.1:4000/www/$1 [P]
>
> All of the above are equivalent.
>
>
>
> All domains are setup under /www/domain.com
>
> When I try to access domain.com/info.php however, it just shows the file
> as text. (<?php info(); ?>) There are no errors in apache's error_log or
> PHP-FPM's. Both are set to debug.
>
>
> For the ProxyPass directive you have above, http://domain.com/info.php is
> not correct, and it SHOULD show you the info.php file as text. The correct
> URL for the ProxyPass directive you gave is http://domain.com/www/info.php
> This is because the ProxyPass directive you gave will only proxy requests
> for URI paths that begin with "/www/" (this is what the first argument to
> the ProxyPass directive -- or the enclosing Location block -- controls).
>
> If using the correct URL doesn't work, here are some more things to look
> at:
>
> Make sure PHP-FPM is correctly configured to server URI paths that all
> begin with "/www/". You may need to change your directory structure for
> your PHP-FPM / PHP document root (which is separate from the Apache HTTP
> Server document root), or change the PHP document_root config setting in
> order to get the results you want.
>
> Make sure you have PHP-FPM error logging turned on via the error_log
> config item in php-fpm.conf and that you are seeing SOMETHING getting
> logged there (for example, startup messages).
>
>
> Test PHP-FPM independently of Apache HTTP Server to make sure that it is
> working. If it is, then you know that the problem is with Apache. If it
> isn't, then no amount of troubleshooting Apache will help. I recommend
> setting up a script that you can manually run on your web server machine
> that will send an FCGI request to PHP-FPM and display the results:
>
> If you want to use PHP for the script, try:
> https://github.com/adoy/PHP-FastCGI-Client
>
> If you want to use Perl (which is what I personally prefer) for the
> script, try:
> http://search.cpan.org/~tokuhirom/FCGI-Client-0.08/lib/FCGI/Client.pm
>
> You should also be able to find scripts for Python or other languages by
> googling "python fastcgi client" or "python fcgi client"
>
>
> If you are using Apache 2.4.x (or 2.3.x) try turning up the LogLevel for
> proxying to "trace" (which is more detailed than "debug") and see if that
> provides any additional information as to what is -- or is not --
> happening. For example, when debugging PHP-FPM issues, I use:
>
> LogLevel info ssl:notice rewrite:trace8 proxy:trace8 proxy_fcgi:trace8
>
>
> Good luck! I hope this helps.
>
> --
> Mark Montague
> mark [at] catseye
>
>


mark at catseye

Mar 5, 2012, 5:51 AM

Post #4 of 8 (2600 views)
Permalink
Re: mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution? [In reply to]

On March 3, 2012 7:22 , Daniel <dancom96 [at] gmail> wrote:
> Thank you, I just realized that earlier, as I thought Location /www/
> meant server side.
> It works, however it passes all traffic through PHP-FPM and gives a
> "Access denied." message on static files, and does not allow passing
> variables through the URL with the mod_rewrite method.
>
> An alternative rewrite, RewriteRule ^/?(.*\.php)$
> fcgi://127.0.0.1:9000/www/$1 <http://127.0.0.1:9000/www/$1> [P,L],
> allows static files to work, but breaks PHP files when you try to pass
> variables, or even add a symbol, as like before. (ex: info.php?)
>
> Is there any 'fully-working' solution for PHP-FPM with Apache 2.4?
> None of the methods seem to work as intended. Either static files do
> not work, or variables cannot be passed.

I have PHP-FPM fully working with a patched Apache 2.3.12, so it should
be workable with 2.4.

For passing static files, this is just a guess, but make sure you have
default_mimetype set to an empty value in php.ini. If this does not
help, let me know and I'll look at my configuration more closely.

For the RewriteRule not passing query strings (variables), see
https://issues.apache.org/bugzilla/show_bug.cgi?id=51077
Unfortunately, the person with commit access who looked at this did not
"see the rationale" for it, and I have not had time to go back and
install the entire testing framework (which is apparently a big pain,
according to the recent thread on the topic) to see what tests the patch
breaks and how/why it breaks them. I do hope to go back and take
another stab at this, but I can't say when it will be, so if anyone else
wants to, please feel free.

--
Mark Montague
mark [at] catseye


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


dancom96 at gmail

Mar 5, 2012, 6:04 AM

Post #5 of 8 (2587 views)
Permalink
Re: mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution? [In reply to]

I have found an alternative method that works nicely, only passes .php
files to PHP-FPM and allows the variables to pass.
ProxyPassMatch ^(.*\.php)$ fcgi://
127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com$1

This is really weird though, because when it's put outside of a vhost, it
works properly, but when I put it inside one, it gives a 404. Error logs
show up for the same URL, but when put inside the vhost, it says it does
not exist.

Any idea why?

vhost:
AH00128: File does not exist: proxy:fcgi://
127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com//index.php

outside of vhost:
AH00947: connected /www/danielhe/danielhe.com/cookie.danielhe.com//index.phpto
127.0.0.1:9000


On Mon, Mar 5, 2012 at 9:34 AM, Mark Montague <markmont [at] umich> wrote:

> On March 3, 2012 7:22 , Daniel <dancom96 [at] gmail> <dancom96 [at] gmail>wrote:
>
> Thank you, I just realized that earlier, as I thought Location /www/ meant
> server side.
> It works, however it passes all traffic through PHP-FPM and gives a
> "Access denied." message on static files, and does not allow passing
> variables through the URL with the mod_rewrite method.
>
> An alternative rewrite, RewriteRule ^/?(.*\.php)$ fcgi://
> 127.0.0.1:9000/www/$1 [P,L], allows static files to work, but breaks PHP
> files when you try to pass variables, or even add a symbol, as like before.
> (ex: info.php?)
>
> Is there any 'fully-working' solution for PHP-FPM with Apache 2.4? None
> of the methods seem to work as intended. Either static files do not work,
> or variables cannot be passed.
>
>
> I have PHP-FPM fully working with a patched Apache 2.3.12, so it should be
> workable with 2.4.
>
> For passing static files, this is just a guess, but make sure you have
> default_mimetype set to an empty value in php.ini. If this does not help,
> let me know and I'll look at my configuration more closely.
>
> For the RewriteRule not passing query strings (variables), see
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51077 Unfortunately,
> the person with commit access who looked at this did not "see the
> rationale" for it, and I have not had time to go back and install the
> entire testing framework (which is apparently a big pain, according to the
> recent thread on the topic) to see what tests the patch breaks and how/why
> it breaks them. I do hope to go back and take another stab at this, but I
> can't say when it will be, so if anyone else wants to, please feel free.
>
> --
> Mark Montague
> LSA Research Systems Group
> University of Michigan
> markmont [at] umich
>
>


dennisml at conversis

Mar 5, 2012, 7:33 AM

Post #6 of 8 (2615 views)
Permalink
Re: mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution? [In reply to]

I haven't been able to play with this yet but shouldn't something like this
work as well?

<LocationMatch \.php$>
ProxyPass fcgi://127.0.0.1:9000
</LocationMatch>

Regards,
Dennis

On 03/05/2012 03:04 PM, Daniel wrote:
> I have found an alternative method that works nicely, only passes .php
> files to PHP-FPM and allows the variables to pass.
> ProxyPassMatch ^(.*\.php)$
> fcgi://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com$1
> <http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com$1>
>
> This is really weird though, because when it's put outside of a vhost, it
> works properly, but when I put it inside one, it gives a 404. Error logs
> show up for the same URL, but when put inside the vhost, it says it does
> not exist.
>
> Any idea why?
>
> vhost:
> AH00128: File does not exist:
> proxy:fcgi://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com//index.php
> <http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com//index.php>
>
> outside of vhost:
> AH00947: connected
> /www/danielhe/danielhe.com/cookie.danielhe.com//index.php
> <http://danielhe.com/cookie.danielhe.com//index.php> to 127.0.0.1:9000
> <http://127.0.0.1:9000>
>
>
> On Mon, Mar 5, 2012 at 9:34 AM, Mark Montague <markmont [at] umich
> <mailto:markmont [at] umich>> wrote:
>
> On March 3, 2012 7:22 , Daniel <dancom96 [at] gmail>
> <mailto:dancom96 [at] gmail> wrote:
>> Thank you, I just realized that earlier, as I thought Location /www/
>> meant server side.
>> It works, however it passes all traffic through PHP-FPM and gives a
>> "Access denied." message on static files, and does not allow passing
>> variables through the URL with the mod_rewrite method.
>>
>> An alternative rewrite, RewriteRule ^/?(.*\.php)$
>> fcgi://127.0.0.1:9000/www/$1 <http://127.0.0.1:9000/www/$1> [P,L],
>> allows static files to work, but breaks PHP files when you try to
>> pass variables, or even add a symbol, as like before. (ex: info.php?)
>>
>> Is there any 'fully-working' solution for PHP-FPM with Apache 2.4?
>> None of the methods seem to work as intended. Either static files do
>> not work, or variables cannot be passed.
>
> I have PHP-FPM fully working with a patched Apache 2.3.12, so it should
> be workable with 2.4.
>
> For passing static files, this is just a guess, but make sure you have
> default_mimetype set to an empty value in php.ini. If this does not
> help, let me know and I'll look at my configuration more closely.
>
> For the RewriteRule not passing query strings (variables), see
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51077
> Unfortunately, the person with commit access who looked at this did not
> "see the rationale" for it, and I have not had time to go back and
> install the entire testing framework (which is apparently a big pain,
> according to the recent thread on the topic) to see what tests the
> patch breaks and how/why it breaks them. I do hope to go back and take
> another stab at this, but I can't say when it will be, so if anyone
> else wants to, please feel free.
>
> --
> Mark Montague
> LSA Research Systems Group
> University of Michigan
> markmont [at] umich <mailto:markmont [at] umich>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


dancom96 at gmail

Mar 5, 2012, 12:59 PM

Post #7 of 8 (2616 views)
Permalink
Re: mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution? [In reply to]

Thank you! This worked for me :)
<LocationMatch ^(.*\.php)$>
ProxyPass fcgi://127.0.0.1:9000
</LocationMatch>

I'm not sure why the ProxyPassMatch does not work inside the vhost though,
but LocationMatch does.

On Mon, Mar 5, 2012 at 11:33 AM, Dennis Jacobfeuerborn <
dennisml [at] conversis> wrote:

> I haven't been able to play with this yet but shouldn't something like
> this work as well?
>
> <LocationMatch \.php$>
> ProxyPass fcgi://127.0.0.1:9000
> </LocationMatch>
>
> Regards,
> Dennis
>
>
> On 03/05/2012 03:04 PM, Daniel wrote:
>
>> I have found an alternative method that works nicely, only passes .php
>> files to PHP-FPM and allows the variables to pass.
>> ProxyPassMatch ^(.*\.php)$
>> fcgi://127.0.0.1:9000/www/**danielhe/danielhe.com/cookie.**danielhe.com$1<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com$1>
>> <http://127.0.0.1:9000/www/**danielhe/danielhe.com/cookie.**
>> danielhe.com$1<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com$1>
>> >
>>
>>
>> This is really weird though, because when it's put outside of a vhost, it
>> works properly, but when I put it inside one, it gives a 404. Error logs
>> show up for the same URL, but when put inside the vhost, it says it does
>> not exist.
>>
>> Any idea why?
>>
>> vhost:
>> AH00128: File does not exist:
>> proxy:fcgi://127.0.0.1:9000/**www/danielhe/danielhe.com/**
>> cookie.danielhe.com//index.php<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com//index.php>
>> <http://127.0.0.1:9000/www/**danielhe/danielhe.com/cookie.**
>> danielhe.com//index.php<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com//index.php>
>> >
>>
>>
>> outside of vhost:
>> AH00947: connected
>> /www/danielhe/danielhe.com/**cookie.danielhe.com//index.php<http://danielhe.com/cookie.danielhe.com//index.php>
>> <http://danielhe.com/cookie.**danielhe.com//index.php<http://danielhe.com/cookie.danielhe.com//index.php>>
>> to 127.0.0.1:9000
>> <http://127.0.0.1:9000>
>>
>>
>>
>> On Mon, Mar 5, 2012 at 9:34 AM, Mark Montague <markmont [at] umich
>> <mailto:markmont [at] umich>> wrote:
>>
>> On March 3, 2012 7:22 , Daniel <dancom96 [at] gmail>
>> <mailto:dancom96 [at] gmail> wrote:
>>
>>> Thank you, I just realized that earlier, as I thought Location /www/
>>> meant server side.
>>> It works, however it passes all traffic through PHP-FPM and gives a
>>> "Access denied." message on static files, and does not allow passing
>>> variables through the URL with the mod_rewrite method.
>>>
>>> An alternative rewrite, RewriteRule ^/?(.*\.php)$
>>> fcgi://127.0.0.1:9000/www/$1 <http://127.0.0.1:9000/www/$1> [P,L],
>>>
>>> allows static files to work, but breaks PHP files when you try to
>>> pass variables, or even add a symbol, as like before. (ex: info.php?)
>>>
>>> Is there any 'fully-working' solution for PHP-FPM with Apache 2.4?
>>> None of the methods seem to work as intended. Either static files do
>>> not work, or variables cannot be passed.
>>>
>>
>> I have PHP-FPM fully working with a patched Apache 2.3.12, so it should
>> be workable with 2.4.
>>
>> For passing static files, this is just a guess, but make sure you have
>> default_mimetype set to an empty value in php.ini. If this does not
>> help, let me know and I'll look at my configuration more closely.
>>
>> For the RewriteRule not passing query strings (variables), see
>> https://issues.apache.org/**bugzilla/show_bug.cgi?id=51077<https://issues.apache.org/bugzilla/show_bug.cgi?id=51077>
>> Unfortunately, the person with commit access who looked at this did not
>> "see the rationale" for it, and I have not had time to go back and
>> install the entire testing framework (which is apparently a big pain,
>> according to the recent thread on the topic) to see what tests the
>> patch breaks and how/why it breaks them. I do hope to go back and take
>> another stab at this, but I can't say when it will be, so if anyone
>> else wants to, please feel free.
>>
>> --
>> Mark Montague
>> LSA Research Systems Group
>> University of Michigan
>> markmont [at] umich <mailto:markmont [at] umich>
>>
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe [at] httpd**apache.org<users-unsubscribe [at] httpd>
> For additional commands, e-mail: users-help [at] httpd
>
>


dancom96 at gmail

Mar 6, 2012, 2:37 PM

Post #8 of 8 (2726 views)
Permalink
Re: mod_proxy_fcgi + PHP-FPM on Apache 2.4 solution? [In reply to]

For some reason proxy_fcgi gives a blank page every couple of requests, and
then one of Apache's children segfaults using any method to connect to
PHP-FPM.

[Tue Mar 06 17:27:50.801406 2012] [proxy_fcgi:error] [pid 26164:tid
3078687600] [client x:22361] AH01070: Error parsing script headers
[Tue Mar 06 17:27:52.890925 2012] [proxy_fcgi:error] [pid 26164:tid
3077741424] [client x:40332] AH01070: Error parsing script headers
[Tue Mar 06 17:28:18.853169 2012] [proxy_fcgi:error] [pid 26164:tid
3080309616] [client x:47248] AH01070: Error parsing script headers
[Tue Mar 06 17:28:20.608863 2012] [proxy_fcgi:error] [pid 26164:tid
3079498608] [client x:22609] AH01070: Error parsing script headers
[Tue Mar 06 17:30:47.206771 2012] [core:notice] [pid 26163:tid 3083507392]
AH00052: child pid 26164 exit signal Segmentation fault (11)

(By the way, I'm new to mailing lists, if this does not count as the same
topic, let me know)

- Daniel

On Mon, Mar 5, 2012 at 4:59 PM, Daniel <dancom96 [at] gmail> wrote:

> Thank you! This worked for me :)
> <LocationMatch ^(.*\.php)$>
> ProxyPass fcgi://127.0.0.1:9000
> </LocationMatch>
>
> I'm not sure why the ProxyPassMatch does not work inside the vhost though,
> but LocationMatch does.
>
> On Mon, Mar 5, 2012 at 11:33 AM, Dennis Jacobfeuerborn <
> dennisml [at] conversis> wrote:
>
>> I haven't been able to play with this yet but shouldn't something like
>> this work as well?
>>
>> <LocationMatch \.php$>
>> ProxyPass fcgi://127.0.0.1:9000
>> </LocationMatch>
>>
>> Regards,
>> Dennis
>>
>>
>> On 03/05/2012 03:04 PM, Daniel wrote:
>>
>>> I have found an alternative method that works nicely, only passes .php
>>> files to PHP-FPM and allows the variables to pass.
>>> ProxyPassMatch ^(.*\.php)$
>>> fcgi://127.0.0.1:9000/www/**danielhe/danielhe.com/cookie.**
>>> danielhe.com$1<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com$1>
>>> <http://127.0.0.1:9000/www/**danielhe/danielhe.com/cookie.**
>>> danielhe.com$1<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com$1>
>>> >
>>>
>>>
>>> This is really weird though, because when it's put outside of a vhost, it
>>> works properly, but when I put it inside one, it gives a 404. Error logs
>>> show up for the same URL, but when put inside the vhost, it says it does
>>> not exist.
>>>
>>> Any idea why?
>>>
>>> vhost:
>>> AH00128: File does not exist:
>>> proxy:fcgi://127.0.0.1:9000/**www/danielhe/danielhe.com/**
>>> cookie.danielhe.com//index.php<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com//index.php>
>>> <http://127.0.0.1:9000/www/**danielhe/danielhe.com/cookie.**
>>> danielhe.com//index.php<http://127.0.0.1:9000/www/danielhe/danielhe.com/cookie.danielhe.com//index.php>
>>> >
>>>
>>>
>>> outside of vhost:
>>> AH00947: connected
>>> /www/danielhe/danielhe.com/**cookie.danielhe.com//index.php<http://danielhe.com/cookie.danielhe.com//index.php>
>>> <http://danielhe.com/cookie.**danielhe.com//index.php<http://danielhe.com/cookie.danielhe.com//index.php>>
>>> to 127.0.0.1:9000
>>> <http://127.0.0.1:9000>
>>>
>>>
>>>
>>> On Mon, Mar 5, 2012 at 9:34 AM, Mark Montague <markmont [at] umich
>>> <mailto:markmont [at] umich>> wrote:
>>>
>>> On March 3, 2012 7:22 , Daniel <dancom96 [at] gmail>
>>> <mailto:dancom96 [at] gmail> wrote:
>>>
>>>> Thank you, I just realized that earlier, as I thought Location /www/
>>>> meant server side.
>>>> It works, however it passes all traffic through PHP-FPM and gives a
>>>> "Access denied." message on static files, and does not allow passing
>>>> variables through the URL with the mod_rewrite method.
>>>>
>>>> An alternative rewrite, RewriteRule ^/?(.*\.php)$
>>>> fcgi://127.0.0.1:9000/www/$1 <http://127.0.0.1:9000/www/$1> [P,L],
>>>>
>>>> allows static files to work, but breaks PHP files when you try to
>>>> pass variables, or even add a symbol, as like before. (ex: info.php?)
>>>>
>>>> Is there any 'fully-working' solution for PHP-FPM with Apache 2.4?
>>>> None of the methods seem to work as intended. Either static files do
>>>> not work, or variables cannot be passed.
>>>>
>>>
>>> I have PHP-FPM fully working with a patched Apache 2.3.12, so it
>>> should
>>> be workable with 2.4.
>>>
>>> For passing static files, this is just a guess, but make sure you have
>>> default_mimetype set to an empty value in php.ini. If this does not
>>> help, let me know and I'll look at my configuration more closely.
>>>
>>> For the RewriteRule not passing query strings (variables), see
>>> https://issues.apache.org/**bugzilla/show_bug.cgi?id=51077<https://issues.apache.org/bugzilla/show_bug.cgi?id=51077>
>>> Unfortunately, the person with commit access who looked at this did
>>> not
>>> "see the rationale" for it, and I have not had time to go back and
>>> install the entire testing framework (which is apparently a big pain,
>>> according to the recent thread on the topic) to see what tests the
>>> patch breaks and how/why it breaks them. I do hope to go back and
>>> take
>>> another stab at this, but I can't say when it will be, so if anyone
>>> else wants to, please feel free.
>>>
>>> --
>>> Mark Montague
>>> LSA Research Systems Group
>>> University of Michigan
>>> markmont [at] umich <mailto:markmont [at] umich>
>>>
>>>
>>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe [at] httpd**apache.org<users-unsubscribe [at] httpd>
>> For additional commands, e-mail: users-help [at] httpd
>>
>>
>

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.