所以我按照这个教程,但是因为在运行代码时被卡住了: # yum install spawn-fcgi 它说没有包。 我正在使用Nginx。 请build议
所以,我已经设置FastCGIcaching像这样: location ~ \.php(/.*)?$ { fastcgi_cache RWI; fastcgi_cache_valid 200 60m; set $nocache 0; if ($request_method = POST) { set $nocache 1; } if ($http_cookie ~ (rwi_userid*|rwi_password*)) { set $nocache 1; } if ($request_uri ~* "/(vb/admincp/)") { set $nocache 1; } fastcgi_no_cache $nocache; fastcgi_cache_bypass $nocache; fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass "unix:/var/www/vhosts/system/{domain}/php-fpm.sock"; include /etc/nginx/fastcgi.conf; } 在server{}块的顶部,我有: […]
这是一个非常古老的FastCGI问题,但我从来没有find满意的答案。 在Google上search短语“(13)权限被拒绝的fastcgi无法创build服务器”会显示有很多人经历了这个问题很长一段时间。 有些人把它归咎于selinux,并build议把它关掉(不能接受的解决scheme)。 其他人认为这是一个奇怪的符号链接权限问题,并build议将Apache日志目录从符号链接转换为纯文本目录。 (不可接受,因为它涉及移动日志文件)请参阅安装FastCGI 。 以下是Apache通常logging的可怕错误。 [Wed Jun 14 22:09:34 2009] [notice] Apache/2.0.40> (Red Hat Linux) configured — resuming normal operations [Wed Jun 14 22:09:35 2009] [crit] (13)Permission denied: FastCGI: can't create server "/var/rt3/bin/mason_handler.fcgi": bind() failed [/etc/httpd/logs/fastcgi/70d9a528c5892f2bf0c25e5a334bed81] 希望serverfault能够最终为这个让FastCGI用户困扰多年的令人困惑和烦人的问题提供一个明确的答案。 当没有人真正知道这种疾病的根本原因时,我实施build议的“治疗”感到不自在。 希望能够深究这个谜团。
我正在寻找一个简单的Nginx microcache解决scheme,最终我看到了两种微caching的方法。 一些教程使用proxy_cache,而另一些使用fastcgi_cache。 这两个解决scheme有什么区别,优缺点? 谢谢!
我有NginX使用fcgi为drupal站点提供服务。 试图浏览到一个不存在的PHP文件(例如www.example.com/this-file-doesn't-exist.php)会导致出现此错误的白屏: '没有指定input文件' 我用这个post来帮我设置NginX: http : //drupal.org/node/110224 这是我的NginXconfiguration文件: server { listen 1.2.3.4:80 default; server_name www.example.com; client_max_body_size 6M; root /var/www/example.com/; index index.php; error_page 404 /index.php; error_page 403 /403.html; # set up a location to serve static images for static error pages location ^~ /error_images/ { root /var/www/static_pages/error_pages; access_log off; expires 30d; } # use our own […]
我有一个FastCGI(mod_fastcgi)问题。 它每隔一段时间就会发生一次,并不会导致完整的服务器崩溃,只有500个错误。 这里有几件事情。 首先,我使用APC,所以PHP是在控制它自己的进程,而不是FastCGI。 另外,我有webroot设置为: /var/www/html 而fcgi-bin里面: /var/www/html/fcgi-bin 首先在这里是apache error_log: [Fri Jan 07 10:22:39 2011] [error] [client 50.16.222.82] (4)Interrupted system call: FastCGI: comm with server "/var/www/html/fcgi-bin/php.fcgi" aborted: select() failed, referer: http://www.domain.com/ 我也对“fcgi-pm”stream程进行了大胆的讨论。 下面是围绕炸弹爆炸时的痕迹: 21725 gettimeofday({1294420603, 14360}, NULL) = 0 21725 read(14, "C /var/www/html/fcgi-bin/php.fcgi – – 6503 38*", 16384) = 46 21725 alarm(131) = 0 21725 […]
我正在用fastcgi在nginx上运行django。 当我做runfcgi时,我看到这些错误: python manage.py runfcgi daemonize=false host=127.0.0.1 port=8000 WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! 在我的nginx错误日志中,我看到这个: 2011/01/31 10:33:16 [error] 15921#0: *4 FastCGI sent in stderr: "WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! WSGIServer: missing FastCGI param SERVER_PORT […]
我build立一个环境(在Ubuntu 10.04.02机器上)处理一个网站与许多(应该至less支持1000)子域,其中每个子域,由不同的FPM池,与不同的用户。 没有什么新鲜的 我的问题是创build(和启动)一个新的FPM池,而不必重新加载/重新启动FPM,这将导致(我知道,非常快)的停机时间。 我写了一个python守护进程,当需要的时候: 创build系统用户 设置子域的Web根目录 创buildsubdomain.conf到我的/etc/php5/fpm/fpm.d/文件夹中 我search了一下,但我没有find一种方法来调用fpm使用一个池,这可能是一个'临时'的解决scheme:主要的fpm实例运行所有的池,evey新的获得自己的fpm实例,然后用cron停止,每周/每月/ dontknowyet重新加载fpm 如果没关系,服务器运行在nginx上,configuration为使用unix socket到fcgi,这是我的nginxtestingconfiguration: server{ listen 80; server_name ~^(?<domain>.+)\.test\.local$; # foo.test.local > myapp_foo root /var/www/myapp/subdomains/myapp_$domain/htdocs; location / { index index.php; } location ~* \.(gif|jpg|png|ico)$ { expires 30d; } location ~ \.php$ { fastcgi_pass unix:/var/web-sock/myapp_$domain-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } ..和我的子域 – fpm.conf: [myapp_foo] listen = […]
我正在尝试在nginx中设置一个全局location 。 这一切现在完全正常,除了需要fastcgi的PHP脚本。 他们正在运行一个404。 有没有一种方法,我可以看到它正在访问的确切path,所以我可以尝试debugging一下,找出我做错了什么?
我运行nginx,fastcgi运行wordpress博客。 经过一段时间的运行,我得到502错误的网关错误。 如果我重新启动服务器的事情工作正常。 在nginx上运行的其他网站不受影响(它们不是基于php的),所以我只是在查看日志文件说上游客户端127.0.0.1没有响应之后才发现它必须是fastcgi进程。 如何重新启动? 这个fastcgi过程是否有特殊的日志文件?