Articles of php fpm

Drupal 7多站点子文件夹nginxconfiguration

我正在使用perruioconfiguration的Drupal,但我认为这是专为单一的网站。 PHP不能在子文件夹中工作。 我想创build一个结构如下: 主要网站 /var/www/domain.com/master/src/ 子站点 在/ usr /本地/子网站/ _site1 / src目录/ 在/ usr /本地/子网站/ _site2 / src目录/ 在/ usr /本地/子网站/ _site3 / src目录/ 我想要访问的子网站如下: domain.com/site1 domain.com/site2 domain.com/site3 有没有任何nginxconfiguration? 我想添加3个子文件夹到以下configuration。 # -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*- ### Configuration for domain.com. ## HTTP server. server { listen 80; # IPv4 server_name localhost; limit_conn […]

nginx代理通过/重写与多个位置乘客应用程序和php-fpm

在一个小团队(最多30人)的服务器上,我安装了几个可以从浏览器访问的服务。 我想用nginx,因为我认为它更轻量级。 所有的服务/应用程序都是独立testing,并完成他们的工作。 但是当把它们放在一起被子文件夹(比如teamserver.local / service1,或者teamserver.local / service2)分开的时候,在重写规则和代理传递的时候,我感到非常挣扎。 我只是不能让子文件夹configuration工作。 这是我的默认configuration: server { listen 80; server_name teamserver.local; rewrite ^ https://$http_host$request_uri? permanent; # redirect to https! } server { listen 443; server_name teamserver.local; root /var/www; ssl on; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; ssl_prefer_server_ciphers on; location /service1 { […]

如何获得进程列表中的php-fpm详细信息

在我的进程列表中使用“top”命令,我得到了很多php-fpm进程。 是否有可能获得更多的信息,如: 谁发起了这个过程(IP) 那里叫哪个class 等等…

根据CPU / RAM利用率计算工作人员连接

我是nginx的新手。 我的机器是4个CPU和8 GB的RAM的6个内存。 按照我的build议 worker_process = 4.我已经为2000个最大客户端设置了worker_connections为500,但是平均负载达到了3-4,有时甚至达到了7,只有大约150个连接。有时会导致504网关超时问题。 每个php-fpm进程的平均CPU利用率是10到15%,有时达到30%,内存利用率是0.1%到0.5% 我应该为worker_connections设置什么样的最佳值,以及如何根据cpu利用率来计算我的最大客户端值。

Nginx拒绝在/ home中读取新目录

我在CentOS6.6,安装了“Akeneo”,一切顺利。 安装在/home/pim所以nginx的实际位置就是app.php所在的web目录。 在/home/pim/web/app.php上做一个/home/pim/web/app.php显示: f: /home/pim/web/app.php dr-xr-xr-x root root / drwxr-xr-x nginx nginx home drwxrwxrwx nginx nginx pim drwxr-xr-x nginx nginx web -rwxrwxr-x nginx nginx app.php Nginx正在使用: user nginx nginx; worker_processes 4; 而PHP-FPM正在使用: listen.owner = nginx listen.group = nginx listen.mode = 0660 ; Unix user/group of processes user = nginx group = nginx Anyonan的想法,为什么这不工作? 我已经打了几个小时的权限了。 希望有人能指引我正确的方向。

Nginx和php-fpm的沟通问题

我有2个nginx服务器和4个专用的php-fpm服务器在上游configuration执行PHP 2个实例在上游我已经给每个php-fpm服务器的端口9000和9001 8个实例。 有时会发生什么情况nginx无法连接端口9000和9001的php-fpm,甚至当我从端口9000或9001的nginx到php-fpm服务器telnet时,它不能连接。 在nginx和php-fpm上应该启用什么types的日志来识别问题,以解决networking连接问题或服务器问题。 任何帮助将不胜感激。 谢谢

Debian 8 + PHP:/ tmp / Permission denied

我有一个在Debian 7 + PHP 5.6上运行良好的网站,最近决定将我的Debian安装升级到Debian 8.一切都很顺利,除了一件小事。 在运行相同的代码时,似乎PHP无法向/tmp/写任何东西,现在我得到如下消息: errno: 2, errstr: "ZipArchive::extractTo(): Permission denied", errcontext: { Filepath: "/tmp/phpVTUxDh", Options: null, Zip: { status: 0, statusSys: 0, numFiles: 12, filename: "/tmp/phpVTUxDh", comment: "" }, Status: true 很明显,方法extractTo()是很难写入\tmp是否有任何具体的更改可能导致此? 那么新系统的PrivateTmp呢? 我试图添加PrivateTmp=false到文件: /etc/systemd/system/multi-user.target.wants/lighttpd.service /etc/systemd/system/multi-user.target.wants/php5-fpm.service 但是,这似乎没有任何区别。 无论如何, \tmp现在总是空的任何具体原因? 另外,tmp的新位置在哪里? 谢谢。

info.php文件在Mac上找不到nginx和php

我试图把php文件info.php放在/usr/local/www/nginx文件夹中。 对于http://test.com/info.phpurl,它给了我错误404 – Not found 。 我可以访问url http://test.com index.html文件 我在nginx.conf文件中的服务器configuration如下。 server { listen 80; server_name test.com www.test.com; root /usr/local/www/nginx; index index.php index.html index.htm; location / { try_files $uri $uri/ =404; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/local/www/nginx-dist; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php-fpm.sock; […]

错误与Apache 2.4和PHP 5.6.14-0 + deb8u1与fpm

我有一个Vagrant机器: Apache / 2.4.10(Debian) PHP 5.6.14-0 + deb8u1和PHP-FPM。 在某些情况下,我得到这个错误:500内部服务器错误。 我在php5-fpm.log中有这个消息 [09-Dec-2015 20:01:24] WARNING: [pool www] child 608 exited on signal 11 (SIGSEGV) after 368.307577 seconds from start 而在error.log文件中,我有这个消息: [Wed Dec 09 20:01:24.944748 2015] [fastcgi:error] [pid 535:tid 140236008924928] (104)Connection reset by peer: [client 192.168.33.1:57201] FastCGI: comm with server "/usr/lib/cgi-bin/php5-fcgi" aborted: read failed [Wed Dec 09 20:01:24.945014 […]

使用PHP-FPM从MPM Worker切换到事件

CentOS 7,Apache 2.4,FPM / FastCGI,MariaDB 我的512M VPS正在消耗一个开发WordPress站点的内存,所以我希望这会导致我更好的调整path; 如果没有,请通知。 我试图从MPM工作者切换到MPM事件,但在Apache重新启动时收到以下错误: AH00526: Syntax error on line 31 of /etc/httpd/conf.d/php.conf: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration /etc/httpd/conf.modules.d/00-mpm.conf # Select the MPM module which should be used by uncommenting exactly # one of the following LoadModule lines: # prefork […]