Articles of FastCGI的

在Djano中,为什么浏览时得到一个500服务器错误,但从SSH的“python mysite.fcgi”工作正常?

如果我浏览到我的网站,我得到一个500“内部服务器错误”。 但是,如果我SSH到我的服务器,并进入我的网站的文件夹,并运行“python mysite.fcgi”,我看到HTML呈现良好。 显然,有些事情是错的,但我不知道是什么。 这是我的.htaccess文件: AddHandler fastcgi-script .fcgi RewriteEngine On RewriteRule ^(media/.*)$ – [L] RewriteRule ^(static/.*)$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] 这是我的mysite.fcgi文件: #!/usr/bin/python2.5 import sys, os sys.path.insert(0, "/kunden/homepages/34/[mydir]/htdocs/projects/django") sys.path.insert(1, "/kunden/homepages/34/[mydir]/lib/python/site-packages") os.chdir("/kunden/homepages/34/[mydir]/htdocs/projects/django/mysite") os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' from django.core.servers.fastcgi import runfastcgi runfastcgi(["method=threaded", "daemonize=false"]) 我正在设置1和1。 这是一个痛苦,但我认为我很接近。

Nginx和多个wordpress实例与fastcgi在同一个域下

我的网站在Apache上运行。 两个wordpress实例存在于/ tr /和/ eng /path下。 我想将设置移动到nginx,但无法设法得到它的工作。 我的设置包括0.7.66,PHP 5.3.2和php-fpm。 / tr /和/ eng /是分别位于/ home / istci / webapps / wordpress_tr和/ home / istci / webapps / wordpress下的两个单独的wordpress实例。 下面是nginx.conf中的服务器部分,它只包含tr的configuration,但是也不能使它工作。 server { listen 80; server_name www.example.com; charset utf-8; location ~ ^/$ { rewrite ^(.+)$ http://www.example.com/tr/ permanent; } location ~ /tr/.*php$ { fastcgi_pass unix:/home/istci/var/run/wptr.sock; fastcgi_index index.php; fastcgi_param […]

如何configurationOS X的内置Apache服务器来使用FastCGI?

我想使用Snow Leopard内置的Apache服务器(显然是2.2.14)提供基于FastCGI的Perl脚本。 我听说有人称MacPorts为必填项。 这是某种“适合”类似于Mac的包pipe理器。 以前,我在Debian和Fedora上为Apacheconfiguration了FastCGI。 在Linux上为ApacheconfigurationFastCGI与OS X有什么区别? 在我开始之前有什么需要注意的问题吗? 谢谢。

我怎样才能debuggingfastcgi导致lighttpd错误的是什么?

我尝试启用我的lighttpd服务器(在Ubuntu上运行)中的mod_fastcgi ,使用以下configuration(直接从conf-available的示例): fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.socket", "max-procs" => 2, "idle-timeout" => 20, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "4", "PHP_FCGI_MAX_REQUESTS" => "10000" ), "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" => "enable" )) ) …但是现在lighttpd无法在日志中的以下内容开始: 2010-09-06 17:13:39: (log.c.166) server started 2010-09-06 17:13:39: (mod_fastcgi.c.1104) the fastcgi-backend /usr/bin/php-cgi failed […]

mod_fcgid,perl脚本输出到apache error_log

我试图让安装mod_fcgid后再次运行一个旧的Perl脚本。 我不得不为新客户端安装mod_fcgid,但似乎已经破坏了我的其他一些cgi脚本。 进入页面时,现在有500个错误。 我检查了错误日志,并从脚本的输出是在错误日志…所以脚本正在运行,但由于某种原因,它仍然提供了一个500内部服务器错误的浏览器… HTML头是打印的第一件事…所以我不知道为什么这个错误发生。 错误日志: [略:html输出] [Wed Dec 08 08:59:18 2010] [警告](104)通过peer重置连接:mod_fcgid:从fastcgi服务器错误中读取数据。 [Wed Dec 08 08:59:18 2010] [错误] [客户端xxxx]脚本标题过早结束:www_protect.cgi,referer:http://www.mywebsite.net/ [Wed Dec 08 08:59:21 2010] [notice] mod_fcgid:process /www/sites/somescript.cgi(6747)exit(通讯错误),通过调用exit()终止,返回码:0 fcgi.conf: AddHandler fcgid-script .fcgi .cgi #SocketPath / var / lib / apache2 / fcgid / sock IPCConnectTimeout 45 IPCCommTimeout 20 OutputBufferSize 0 MaxRequestsPerProcess 500 IdleTimeout 3600 ProcessLifeTime […]

在IIS7.5 Windows 7家庭高级版上安装FastCGI

我想在我的Windows 7家庭高级版盒子上的IIS 7.5上安装FastCGI,我在家中使用它做一些随机编码。 但WPI不显示FastCGI选项,我无法find它在IIS中… 我怎么做只有一个安装程序,我已经看到FastCGI安装IIS 5.1和IIS6,但它说FastCGI应该是IIS的一部分…这不是在WPI,而不是在“打开或closuresWindowsfunction” … 我迷路了!

nginx + fastcgi

如何使nginx代理php在所有内核上均匀加速。 当我试图强调testingconfiguration时,Top显示仅使用2个内核。 Cpu0 : 62.6%us, 14.9%sy, 0.0%ni, 18.5%id, 0.3%wa, 0.0%hi, 3.6%si, 0.0%st Cpu1 : 57.1%us, 11.0%sy, 0.0%ni, 31.2%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st Cpu2 : 1.3%us, 0.7%sy, 0.0%ni, 97.0%id, 0.0%wa, 0.0%hi, 1.0%si, 0.0%st Cpu3 : 2.0%us, 1.7%sy, 0.0%ni, 95.7%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st 我有 worker_processes 20; 在nginx.conf中设置 快速启动cgi spawn-fcgi -s /tmp/php.sock -f /usr/sbin/php -u nobody -g […]

设置安全共享主机(Apache,PHP,MySQL)

所以我正在build立一个与Apache,PHP,MySQL共享的主机,最大的问题是如何处理PHP,因为有一百万个选项可以安全地configuration它。 计划是: MySQL的Chroot(内置支持chroot) Chroot for Apache(mod_security) 每个用户执行他们的PHP脚本作为他们自己的用户(见下文) 设置open_basedir 禁用所有“邪恶的”php函数(allow_url_fopen,system,exec等等) 我看着suexec和suphp,但他们似乎很慢; http://blog.stuartherbert.com/php/2007/12/18/using-suexec-to-secure-a-shared-server/ http://blog.stuartherbert.com/php/2008/01/18/使用-suphp到安全-A-共享服务器/ 所以我看了更多,发现了一些其他的解决scheme: apache2-mpm-itk + mod_php(?) mod_fcgid + php-fpm mod_fastcgi + php-fpm 我尝试了一个简单的设置与mod_fastcgi + php-fpm,它似乎工作,运行正确的用户等,但目录旅游的保护仍然是open_basedir(?) 一个解决scheme可能是使用php-fpm的chroot选项,但是会导致很多其他问题 域名parsing器不起作用 发送邮件不起作用 提示?

未知的Apache2 + PHP5 FastCGI 500错误..由search引擎机器人造成的?

我的Ubuntu服务器在FastCGI模式下configuration了Apache 2.2.8和PHP 5.2.4-2ubuntu5.18。 一切运作良好,除了我看到500错误似乎只来自机器人访问服务器..例如(access.log): x.125.71.104 – – [16 / Nov / 2011:10:27:39 +1100]“GET / HTTP / 1.1”500 41377“ – ”“Mozilla / 5.0(compatible; Baiduspider / 2.0; + http:// www.baidu.com/search/spider.html )“ x.40.103.239 – [16 / Nov / 2011:11:05:56 +1100]“GET / HTTP / 1.0”500 14717“ – ”“Mozilla / 5.0(compatible; mon.itor.us – free monitoring service ; http://mon.itor.us )“ x.249.67.114 […]

如何运行mod_php和fastcgi并排?

在当前服务器configuration正在运行FPM / FastCGI的情况下,如何运行某些脚本(这可以在apache conf中的虚拟主机或目录设置中)作为mod_php运行? 服务器操作系统:Ubuntu-Server 11.04