我的服务器上有这个小问题。 几星期我的服务器几次下降(2-3)。 我所能看到的是,每次php-fpm进程中的每一个都在100%以上。 以及我们的驱动器有一个小的写入尖峰(我的意思是指在3disk SSDarrays上的4M吞吐量)。 服务器运行在NGINX + FPM,LEMP服务器上。 它有24个核心,48G RAM和3xSSD的RAID5arrays。 我也检查了错误日志和其他日志,似乎没有任何可以caching的东西…现在已经发生了一个多星期了,我开始担心了。 任何人有类似的问题? 或者可以指向我的方向? 那真可爱。 干杯。
我的大脑正在打破这个。 每一个网站都redirect到我的其他网站之一…我会说这是/默认网站,但直到我只是把它作为默认网站,什么都没有改变。 所有的url让我回到www.justaleaf.com (所有网站在过渡之前工作,而且myhashimotos网站正在工作一点点,因为当我禁用所有其他网站时,redirect登陆) 这里是我的configuration(Ubuntu的MySQL的PHP的FMP)…我是新来的Nginx,我只是失去了现在: /etc/nginx/nginx.conf user www-data; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 768; multi_accept on; use epoll; } http { ## # Basic Settings ## sendfile on; #tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; […]
我有一个VPS运行nginx 1.1.19,php-fpm 5.3.10和APC 3.1.9。 服务器主要运行PHP脚本(vB,SMF,IPB)。我也使用Cloudflare作为CDN。 据我所知,有3个压缩选项,我不确定哪个是相互冗余的,或者它们是什么,哪个服务应该处理。 nginix有gzip,php-fpm有zlib,PHP脚本本身有gzip。 我觉得我已经在很多文档中看到,如果一个web服务器(nginx)正在处理gzip,PHP脚本不应该这样做。 应该在php-fpm zlib与gzip一起启用还是在技术上是一样的东西? 我看到一个源代码说zzib /压缩的gzip / mod_deflate是多余的,不必要地使用CPU周期,但是当zlib和gzip都启用时,我的vB安装似乎运行更顺畅。 有没有人知道这种设置最有效的压缩组合/安排?
有什么办法来禁用错误日志logging在php5-fpm ? 我改变了/etc/php5/fpm/php.ini文件: log_errors = Off display_errors = Off 并重新启动php5-fpm 。 我的nginx日志文件仍然充满了php警告。
嗨,我们最近已经将我们的Magento应用程序从Apache转换到了CentOS 5.6上的nginx和PHP-FPM。 我们有一个外部支付网关,发送给我们一些交易信息。 处理这个问题的PHP文件有一个if($ _ SERVER ['REQUEST_METHOD'] =='POST')的情况。 在那个正在执行的PHP文件中有这个IF语句的代码。 但是,IF语句中的所有代码都没有被执行。 我的etc / nginx / conf.d / domain.conf文件: fastcgi_read_timeout 240; server { listen 80; server_name domain.com; rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www } server { listen 80 default; ## SSL directives might go here listen 443 default ssl; ssl_certificate /etc/ssl/domain.com.crt; ssl_certificate_key /etc/ssl/domain.key; server_name […]
我刚刚收到了我的第一个VPS,并且想要安装一个nginx + PHP + MariaDB设置。 而且,我确实做到了,但是configuration时遇到问题。 让nginx提供一个静态的.html文件是没有问题的,试图提供一个dynamic的PHP文件,但只是显示一个公共的“502坏的网关”消息。 我对nginx日志文件的解释表明了nginx和PHP-FPM之间的通信错误,但我是一个血腥的新手,所以这可能是非常错误的。 PHP5-fpm.log: [05-Aug-2012 21:50:10] NOTICE: fpm is running, pid 10982 [05-Aug-2012 21:50:10] NOTICE: ready to handle connections nginx的error.log的一部分: 2012/08/06 00:13:20 [error] 11419#0: *4 connect() failed (111: Connection refused) while connecting to upstream, client: REMOVED, server: lo$ 2012/08/06 00:23:21 [error] 11419#0: *9 connect() failed (111: Connection refused) while connecting […]
这是CMD: pecl install apc 结果: downloading APC-3.1.9.tgz … Starting to download APC-3.1.9.tgz (155,540 bytes) ……………………………done: 155,540 bytes 54 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this […]
我正在使用Nginx + PHP-FPM来运行一个基于WordPress的网站。 我有一个URL应该返回dynamic生成的JSON数据用于DataTables jQuery插件。 数据正确返回,但返回码为404。我认为这是一个Nginx的configuration问题,但我一直无法弄清楚为什么。 脚本“getTable.php”在当前使用Apache的站点的生产版本上正常工作。 任何人都知道我怎么能得到这个Nginx的工作? url: http : //dev.iloveskydiving.org/wp-content/plugins/ils-workflow/lib/getTable.php 服务器:CentOS 6 + Varnish(caching禁用开发)+ Nginx + PHP-FPM + WordPress + W3 Total Cache Nginxconfiguration: server { # Server Parameters listen 127.0.0.1:8082; server_name dev.iloveskydiving.org; root /var/www/dev.iloveskydiving.org/html; access_log /var/www/dev.iloveskydiving.org/logs/access.log main; error_log /var/www/dev.iloveskydiving.org/logs/error.log error; index index.php; # Rewrite minified CSS and JS files location ~* \.(css|js) […]
我有一个文件夹包含一些PHP文件服务与PHP的FMP(fastcgi); 在tihs文件夹中,我有一个文件,我想要允许内部IP和拒绝外部。 我有的问题是,这个configuration… # PHP location ~ ^\/some\/path\/(.*\.php)$ { alias /some/path/; fastcgi_split_path_info ^(.+\.php)(/.+)$; # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # # # With php5-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; # Changes due to the alias declaration fastcgi_param SCRIPT_FILENAME $document_root/$1; fastcgi_param SCRIPT_NAME […]
我有一个非常常见的,但烦人的错误,古典:“文件未find”。 我有以下nginx.conf: server { listen 80; server_name aperophp; root /home/gline/mysite/web; location = / { try_files @site @site; } location / { try_files $uri $uri/ @site; } location ~ \.php$ { return 404; } location @site { fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root/index.php; fastcgi_param PATH_INFO $fastcgi_script_name; } } 但是我有这个文件: $ ls -ld /home/gline/mysite/web/index.php -rw——- 1 […]