I try my web hosting environment to mirror locally. On my Rootserver run Nginx
with PHP-FPM under FreeBSD. So i has installed Nginx, PHP and Mysql here local
on Gentoo. But something is not correct, it want not really run. I has search
in web and use the config for Nginx on Gentoo (is other as on FreeBSD) but
nothing happen. The website (info.php) is blank and in logs i find not the way
which is my mistake.
Has someone a idea where is the mistake. Thank u for help.
Regards
Silvio
04-02-2012, 09:01 AM
Michael Schreckenbauer
Nginx with PHP-FPM
On Monday 02 April 2012 04:26:47 siefke_listen@web.de wrote:
> Hello,
>
> I try my web hosting environment to mirror locally. On my Rootserver run
> Nginx with PHP-FPM under FreeBSD. So i has installed Nginx, PHP and Mysql
> here local on Gentoo. But something is not correct, it want not really run.
> I has search in web and use the config for Nginx on Gentoo (is other as on
> FreeBSD) but nothing happen. The website (info.php) is blank and in logs i
> find not the way which is my mistake.
>
> nginx.conf > http://nopaste.info/72a40e9c5e.html
> php-fpm.conf > http://nopaste.info/94a9de62d5.html
> emerge --info php nginx > http://nopaste.info/225b12e106.html
I'm not really an expert with ngingx and php-fpm, but afaict the error is in
the location line in nginx.conf.
You have:
location ~ .php$ {
...
Afaik this only matches the exact file ".php"
Try changing it to
location ~ ^(.*).php$ {
...
This would match all files ending in ".php"
> Regards
> Silvio
Hth,
Michael
04-02-2012, 12:17 PM
Silvio Siefke
Nginx with PHP-FPM
Hello,
On Mon, 02 Apr 2012 11:01:46 +0200
Michael Schreckenbauer <grimlog@gmx.de> wrote:
> I'm not really an expert with ngingx and php-fpm, but afaict the error is in
> the location line in nginx.conf.
> You have:
> location ~ .php$ {
> ...
> Afaik this only matches the exact file ".php"
>
> Try changing it to
> location ~ ^(.*).php$ {
> ...
> This would match all files ending in ".php"
thanks for advice. But nothing happen the result is same like before.
Blank website, no phpinfo output.
In logs stand only "closed keepalive connection, can it be that something
in php-fpm.conf not correct is set?
Regards
Silvio
04-02-2012, 12:30 PM
Michael Schreckenbauer
Nginx with PHP-FPM
On Monday 02 April 2012 14:17:47 Silvio Siefke wrote:
> Hello,
>
> On Mon, 02 Apr 2012 11:01:46 +0200
>
> Michael Schreckenbauer <grimlog@gmx.de> wrote:
> > I'm not really an expert with ngingx and php-fpm, but afaict the error is
> > in the location line in nginx.conf.
> > You have:
> > location ~ .php$ {
> > ...
> > Afaik this only matches the exact file ".php"
> >
> > Try changing it to
> > location ~ ^(.*).php$ {
> > ...
> > This would match all files ending in ".php"
>
> thanks for advice. But nothing happen the result is same like before.
> Blank website, no phpinfo output.
>
> In logs stand only "closed keepalive connection, can it be that something
> in php-fpm.conf not correct is set?
to get more info from nginx, try to increase the log level, eg
error_log /var/log/nginx/error_log debug;
php-fpm.conf looks correct to me.
You include fastcgi.conf. Could you post the contents?
> Regards
> Silvio
Best,
Michael
04-02-2012, 04:02 PM
Silvio Siefke
Nginx with PHP-FPM
Hello,
On Mon, 02 Apr 2012 14:30 +0200
Michael Schreckenbauer <grimlog@gmx.de> wrote:
> to get more info from nginx, try to increase the log level, eg
> error_log /var/log/nginx/error_log debug;
> php-fpm.conf looks correct to me.
> You include fastcgi.conf. Could you post the contents?
Is this maybe the mistake or where can be the error?
Regards
Silvio
04-05-2012, 12:32 AM
Silvio Siefke
Nginx with PHP-FPM
Hello,
ok i have found the problem. Maybe is it the php.ini files, because i has
deactivated the ini files at all and the system run. But in disable_functions
is not set phpinfo, why nginx give it not out?