Re[4]: [gentoo-user] Nginx with PHP-FPM
Silvio, Thursday, April 5, 2012, 2:11:55 AM, you wrote: S thanks i have compile php and nginx with ur flags. But the result is same. S Nginx like not PHP. The website is blank. Not give out phpinfo(); If you have compiled nginx and php with these flags, things should work, if you tell both components how to communicate with each other. What is the output of curl -I http://localhost/info.php and of curl http://localhost/info.php assuming that you still have the file info.php that showed up in the logs quoted in your original post. Also: ps ax | grep nginx ps ax | grep php-fpm netstat -lpnt | grep :80 netstat -lpnt | grep :9000 S I dont know what should do now, when self the original sourcecode want not S run, thats not normal. Calm down, wind some watch, and start to think about which points are accessible for debugging this conundrum. s.
Re: [gentoo-user] Nginx with PHP-FPM
Hello, now i have build php and nginx from source direct, emerge --unmerge, have downloaded the sourcecode and compile it and same it run not. Thats really crazy, what is this? Is this maybe with eselect profile list option? Because i use gentoo-desk imap # eselect profile list Available profile symlink targets: [1] default/linux/x86/10.0 [2] default/linux/x86/10.0/selinux [3] default/linux/x86/10.0/desktop * [4] default/linux/x86/10.0/desktop/gnome [5] default/linux/x86/10.0/desktop/kde [6] default/linux/x86/10.0/developer [7] default/linux/x86/10.0/server [8] hardened/linux/x86 [9] hardened/linux/x86/selinux Is this maybe the mistake or where can be the error? Regards Silvio
Re[2]: [gentoo-user] Nginx with PHP-FPM
Silvio, Tuesday, April 3, 2012, 11:39:05 PM, you wrote: S Could someone possibly provide me the USE flags available S if someone has run Nginx, PHP and Fpm. S It were nice. # emerge nginx php:5.3 -pv These are the packages that would be merged, in order: Calculating dependencies ... done! [ebuild R] www-servers/nginx-1.1.17 USE=http http-cache ipv6 pcre ssl vim-syntax -aio -debug -libatomic -pcre-jit NGINX_MODULES_HTTP=access addition auth_basic autoindex browser charset dav empty_gif fastcgi geo gzip headers_more limit_req limit_zone map memcached proxy push realip referer rewrite scgi split_clients ssi stub_status sub upload upstream_ip_hash userid uwsgi xslt -cache_purge -degradation -flv -geoip -gzip_static -image_filter -mp4 -passenger -perl -random_index -secure_link -slowfs_cache -upload_progress NGINX_MODULES_MAIL=-imap -pop3 -smtp 0 kB [ebuild R] dev-lang/php-5.3.10-r2 USE=bcmath berkdb bzip2 calendar cgi cli crypt ctype curl doc exif fileinfo filter fpm gd gdbm gmp hash iconv imap ipv6 json mhash mysql mysqli nls pcntl pdo phar posix postgres readline session simplexml soap sockets spell sqlite sqlite3 ssl suhosin threads tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib -apache2 -cdb -cjk -curlwrappers -debug -embed -enchant -firebird -flatfile (-frontbase) -ftp -inifile -intl -iodbc -kerberos -kolab -ldap -ldap-sasl -libedit -mssql -mysqlnd -oci8-instant-client -odbc -pic -qdbm -recode -sharedmem -snmp (-sybase-ct) -sysvipc -xpm 0 kB The important parts are fastcgi for nginx and fpm for php. s.
Re: Re[2]: [gentoo-user] Nginx with PHP-FPM
Good Morning, On Wed, 4 Apr 2012 23:13:14 +0200 Stefan Schmiedl s...@xss.de wrote: # emerge nginx php:5.3 -pv thanks i have compile php and nginx with ur flags. But the result is same. Nginx like not PHP. The website is blank. Not give out phpinfo(); I dont know what should do now, when self the original sourcecode want not run, thats not normal. Regards and thx to all Silvio
Re: [gentoo-user] 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? Regards Silvio
Re: [gentoo-user] Nginx with PHP-FPM
Hello, nginx list dialog: On Tue, 3 Apr 2012 04:02:14 -0400 (EDT) locojohn nginx-fo...@nginx.us wrote: mkdir -p /var/run/fastcgi/php-fpm.sock php-fpm.conf: ;listen = 127.0.0.1:9000 ;listen.allowed_clients = 127.0.0.1 listen = /var/run/fastcgi/php-fpm.sock listen.owner = nginx listen.group = nginx nginx.conf: location \.php$ { include fastcgi_params; fastcgi_pass unix:/var/run/fastcgi/php-fpm.sock; } Thx for advice. But will not run. When i start nginx it come only gentoo-desk ~ # /etc/init.d/nginx start * Checking nginx' configuration ... nginx: [emerg] invalid host in upstream /var/run/fastcgi/php-fpm.sock in /etc/nginx/nginx.conf:35 nginx: configuration file /etc/nginx/nginx.conf test failed nginx: [emerg] invalid host in upstream /var/run/fastcgi/php-fpm.sock in /etc/nginx/nginx.conf:35 nginx: configuration file /etc/nginx/nginx.conf test failed * failed, please correct errors above[ !! ] * ERROR: nginx failed to start error_log 2012/04/03 12:44:52 [emerg] 2062#0: invalid host in upstream /var/run/fastcgi/php-fpm.sock in /etc/nginx/nginx.conf:35 2012/04/03 12:44:52 [emerg] 2063#0: invalid host in upstream /var/run/fastcgi/php-fpm.sock in /etc/nginx/nginx.conf:35 2012/04/03 12:45:02 [emerg] 2073#0: invalid host in upstream /var/run/fastcgi/php-fpm.sock in /etc/nginx/nginx.conf:35 2012/04/03 12:45:02 [emerg] 2074#0: invalid host in upstream /var/run/fastcgi/php-fpm.sock in /etc/nginx/nginx.conf:35 /error_log Mmh can it be that nginx and / or php not right build with emerge? Regards Silvio
Re: [gentoo-user] Nginx with PHP-FPM
Hello, Could someone possibly provide me the USE flags available if someone has run Nginx, PHP and Fpm. It were nice. Regards Silvio
Re: [gentoo-user] Nginx with PHP-FPM
On Monday 02 April 2012 04:26:47 siefke_lis...@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
Re: [gentoo-user] Nginx with PHP-FPM
Hello, On Mon, 02 Apr 2012 11:01:46 +0200 Michael Schreckenbauer grim...@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
Re: [gentoo-user] 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 grim...@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
Re: [gentoo-user] Nginx with PHP-FPM
Hello, On Mon, 02 Apr 2012 14:30 +0200 Michael Schreckenbauer grim...@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? The fastcgi.conf fastcgi_param SCRIPT_FILENAME$document_root$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME$fastcgi_script_name; fastcgi_param REQUEST_URI$request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL$server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWAREnginx/$nginx_version; fastcgi_param REMOTE_ADDR$remote_addr; fastcgi_param REMOTE_PORT$remote_port; fastcgi_param SERVER_ADDR$server_addr; fastcgi_param SERVER_PORT$server_port; fastcgi_param SERVER_NAME$server_name; # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS200; I have write debug not info in error log. localhost.error_log 2012/04/02 17:59:24 [info] 21288#0: *4 client closed prematurely connection while reading client request line, client: 192.168.0.20, server: localhost /localhost.error_log localhost.access_log 192.168.0.20 - - [02/Apr/2012:17:59:05 +0200] GET / HTTP/1.1 200 633 - Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19 - 192.168.0.20 - - [02/Apr/2012:17:59:05 +0200] GET /favicon.ico HTTP/1.1 200 1650 - Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19 - 192.168.0.20 - - [02/Apr/2012:17:59:21 +0200] GET /info.php HTTP/1.1 200 289 - Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19 0.47 192.168.0.20 - - [02/Apr/2012:17:59:24 +0200] - 400 0 - - - /localhost.access_log No phpinfo output. Its strange. Regards Silvio
Re: [gentoo-user] Nginx with PHP-FPM
Hello, i have now setup a Freebsd box in Vmware and build the environment, has no problem, run without any problems. Strange that not run on Gentoo. I have changed the Gentoo Nginx config to Freebsd Nginx config, but the result is the same. Blank white page. nginx.conf http://nopaste.info/98104d56da.html In log can only read: access.log 192.168.0.20 - - [03/Apr/2012:03:55:07 +0200] GET /info.php HTTP/1.1 200 29 - Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19 - /acces.log error.log 2012/04/03 03:55:25 [info] 4055#0: *2 client closed prematurely connection while reading client request line, client: 192.168.0.20, server: localhost /error.log php-fpm.log (activate debug [03-Apr-2012 03:56:25.988472] DEBUG: pid 3825, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 1 spare children, 1 running children. Spawning rate 1 /php-fpm.log Has someone a idea? Thx, Regards Silvio
[gentoo-user] Nginx with PHP-FPM
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 error_log 2012/04/02 04:23:05 [notice] 3636#0: using the epoll event method 2012/04/02 04:23:05 [notice] 3636#0: nginx/1.0.14 2012/04/02 04:23:05 [notice] 3636#0: OS: Linux 3.3.0 2012/04/02 04:23:05 [notice] 3636#0: getrlimit(RLIMIT_NOFILE): 1024:4096 2012/04/02 04:23:05 [notice] 3637#0: start worker processes 2012/04/02 04:23:05 [notice] 3637#0: start worker process 3640 /error_log localhost.access_log 127.0.0.1 - - [02/Apr/2012:04:23:11 +0200] GET /favicon.ico HTTP/1.1 404 348 - - - 127.0.0.1 - - [02/Apr/2012:04:23:11 +0200] GET /favicon.ico HTTP/1.1 404 319 http://localhost/; Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de-de) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ Midori/0.4 - 127.0.0.1 - - [02/Apr/2012:04:23:11 +0200] GET /favicon.ico HTTP/1.1 404 348 - - - 127.0.0.1 - - [02/Apr/2012:04:23:17 +0200] GET /info.php HTTP/1.1 200 260 - Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de-de) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ Midori/0.4 0.47 127.0.0.1 - - [02/Apr/2012:04:23:17 +0200] GET /info.php HTTP/1.1 200 260 - Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de-de) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ Midori/0.4 0.47 127.0.0.1 - - [02/Apr/2012:04:23:17 +0200] GET /favicon.ico HTTP/1.1 404 348 - - - 127.0.0.1 - - [02/Apr/2012:04:23:17 +0200] GET /favicon.ico HTTP/1.1 404 348 - - - /localhost.access_log localhost.error_log 2012/04/02 04:23:11 [error] 3640#0: *1 open() /var/www/localhost/htdocs/favicon.ico failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /favicon.ico HTTP/1.1, host: localhost 2012/04/02 04:23:11 [info] 3640#0: *1 client 127.0.0.1 closed keepalive connection 2012/04/02 04:23:11 [error] 3640#0: *2 open() /var/www/localhost/htdocs/favicon.ico failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /favicon.ico HTTP/1.1, host: localhost, referrer: http://localhost/; 2012/04/02 04:23:11 [error] 3640#0: *3 open() /var/www/localhost/htdocs/favicon.ico failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /favicon.ico HTTP/1.1, host: localhost 2012/04/02 04:23:11 [info] 3640#0: *3 client 127.0.0.1 closed keepalive connection 2012/04/02 04:23:17 [error] 3640#0: *8 open() /var/www/localhost/htdocs/favicon.ico failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /favicon.ico HTTP/1.1, host: localhost 2012/04/02 04:23:17 [info] 3640#0: *8 client 127.0.0.1 closed keepalive connection 2012/04/02 04:23:17 [error] 3640#0: *9 open() /var/www/localhost/htdocs/favicon.ico failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /favicon.ico HTTP/1.1, host: localhost 2012/04/02 04:23:17 [info] 3640#0: *9 client 127.0.0.1 closed keepalive connection /localhost.error_log Has someone a idea where is the mistake. Thank u for help. Regards Silvio