我无法安装php5-apc。 我似乎没有得到任何错误。 root@applications-server-1:~# aptitude install php5-apc The following NEW packages will be installed: php5-apc{b} 0 packages upgraded, 1 newly installed, 0 to remove and 57 not upgraded. Need to get 64.6 kB of archives. After unpacking 168 kB will be used. The following packages have unmet dependencies: php5-apc : Depends: php5-common (= 5.3.22-1~dotdeb.0) but 5.4.6-1ubuntu1.1 […]
我想弄清楚为什么我有这么多的错误日志: [error] 1545#0: *713626 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: www.example.com, request: "GET / HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "www.example.com" 所有关于这个错误的post,我已经看到了导致坏的网关错误,但是我已经快速浏览了网站上的许多页面,试图得到错误popup,果然,最新的日志显示这个错误与我的IP。 不过,我从来没有任何问题获得任何页面加载。 这个问题可能是什么? nginxconfiguration: worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; # output compression saves bandwidth gzip on; gzip_static on; […]
我是nginx和php-fpm的新手。 我的问题: 我需要创build两个php-fpmconfiguration文件还是只有一个? 可以两个nginx的configuration(不同的域名/应用程序)指向相同的PHP套接字? 如果是这样会导致会话冲突或任何其他问题? 下面有两个nginxconfiguration和一个php-fpmconfiguration。 如上所述,我应该有两个php-fpmconfiguration? php-fpmconfiguration: [appname1] listen = /var/www/apps/appname1/tmp/php.sock user = www-data group = www-data pm = dynamic pm.max_children = <%= node['php5-fpm']['max_children'] %> pm.start_servers = <%= node['php5-fpm']['start_servers'] %> pm.min_spare_servers = <%= node['php5-fpm']['min_spare_servers'] %> pm.max_spare_servers = <%= node['php5-fpm']['max_spare_servers'] %> pm.max_requests = 1000 pm.status_path = /php_status request_terminate_timeout = 0 request_slowlog_timeout = 0 slowlog = […]
所以我只是在我的VPS上设置了nginx和php5-fpm,从Apache移走了。 我正在运行Debian Squeeze,使用dotdeb.org库中的最新PHP(这意味着PHP 5.4.13-1〜dotdeb.1)。 我有麻烦得到php5-fpm去。 当运行sudo /etc/init.d/php5-fpm start ,我没有得到任何确认,也没有任何错误信号。 运行sudo /etc/init.d/php5-fpm stop 。 如果我通过它的状态arg( sudo /etc/init.d/php5-fpm status ),它返回php5-fpm is not running … failed! 现在我在任何日志中都看不到任何错误,所以我甚至不知道如何开始debugging问题。 有没有人遇到类似的问题,或者知道我应该接下来做什么?
我不知道是否有人可以帮助我为什么这个内存正在使用。 我使用Centos 6.3,Nginx,PHP和MySQL运行一个低端的内存盒,512MB RAM,但是当我运行一个ps aux并且使用了大量的RAM时,Apache就出现了。 apache 1166 0.0 3.7 78620 19500 ? S Apr19 0:01 php-fpm: pool w apache 1167 0.0 3.7 79076 19844 ? S Apr19 0:01 php-fpm: pool w apache 1168 0.0 3.5 78312 18732 ? S Apr19 0:01 php-fpm: pool w apache 1169 0.0 2.6 61744 13656 ? S Apr19 0:01 php-fpm: […]
出于某种原因,我们的网站有一个.jsphp文件需要交给PHP-FPM。 但是,访问将被拒绝,因为默认情况下,PHP-FPM只允许扩展.php 。 这可以通过将以下内容添加到php-fpm.conf来解决 security.limit_extensions = .php .jsphp 但是我只想为Nginxconfiguration中的特定服务器位置执行此操作,如下所示 location ~ (\.php|\.jsphp)$ { try_files $uri = 404; include /usr/local/etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9001; # 9000 for xdebug fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PHP_VALUE "error_log=/usr/local/var/log/our-website.local-error.log"; } 是否可以添加每个服务器位置的PHP-FPM设置security.limit_extensions ? 如果是这样,我该怎么做? 谢谢!
我刚在Ubuntu 12.04上更新了我的PHP 现在,所有的奇怪,我做了一个简单的phpinfo.php在我的服务器上,然后这502坏网关开始出现。 我检查/etc/nginx/sites-available/default nginxconfiguration文件,看起来一切正常: server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ /index.html; # […]
我买了一个新的VPS,我不是一个Linux的极客。 我已经在CentOS 6上安装了LEMP堆栈。我只是尝试在我的VPS上安装Xcache。 我用下面的命令来安装Xcache,但是显示错误。 我用来安装Xcache的命令 yum install php-xcache xcache-admin 和我得到的错误: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.san.fastserv.com * epel: mirrors.kernel.org * extras: mirror.pac-12.org * updates: mirrors.easynews.com Setting up Install Process Resolving Dependencies –> Running transaction check —> Package php-xcache.x86_64 0:3.0.2-1.el6 will be installed –> Processing Dependency: php(zend-abi) = 20090626 for […]
这是我的子域dev.mypage.com的configuration: server { listen 80; server_name dev.mypage.com; root /home/user/web/dev; index index.html index.htm index.php; access_log /home/user/logs/dev/access.log; error_log /home/user/logs/dev/error.log; location / { try_files $uri $uri/ /index.html; allow xxx.xxx.xxx.xxx; deny all; } location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm/dev.sock; fastcgi_index index.php; include fastcgi_params; } } 我想禁止访问/除我以外的所有文件和子目录 (xxx.xxx.xxx.xxx)。 运行这个configuration和 访问dev.mypage.com与其他IP变成403错误 。 与其他IP访问dev.mypage.com/subdir变成403错误 。 使用其他IP访问dev.mypage.com/index.php 返回页面 。 使用其他IP访问dev.mypage.com/subdir/index.php 返回页面 。 所以情况3和4不按预期工作。 […]
我尝试使用apache设置php-fpm 我仍然错过了一块拼图,因为页面返回一个404 The requested URL /php-fpm/index.php was not found on this server. Apache/2.2.24 (Unix) DAV/2 mod_fastcgi/2.4.6 Server at test.dev Port 80 从我所理解的是,别名中提到的path不一定存在,但它应该与下面的ExternalServer指令匹配。 套接字path与在php-fpmconfiguration中设置的完全相同。 我chmodded -R 777 var和tmp目录和站点目录。 我看到socket和fastcgi具有相同的所有者“_www”,那些是默认设置,并且没有必要改变它们。 php54 –with-php-fpm,mod_fastcgi与Homebrew一起安装,但是这个指南也没有帮我 我还可以做些什么? 任何build议非常感谢。 这是我的httpd是什么 <IfModule mod_fastcgi.c> # <FilesMatch \.php$> # SetHandler php-script # </FilesMatch> # Action php-script /php.external # Alias /php.external /var/run/mod_fastcgi/php.fpm AddHandler php-fastcgi .php Action […]