我试图用Kubuntu服务器上的apache设置fastcgi已经有几天了。 尽pipe到处寻找,我无法做到这一点。 如果我尝试使用cgi应用程序运行该站点,则apache将挂起,并在超时后返回500错误。 这是我做的: 我确信已经安装并启用了mod_fastcgi: # pwd /etc/apache2/mods-enabled # ls -lf* lrwxrwxrwx 1 root root 30 2010-07-22 10:01 fastcgi.conf -> ../mods-available/fastcgi.conf lrwxrwxrwx 1 root root 30 2010-07-22 10:01 fastcgi.load -> ../mods-available/fastcgi.load 据我所知,fastcgi.confconfiguration正确: <IfModule mod_fastcgi.c> AddHandler fastcgi-script .fcgi #FastCgiWrapper /usr/lib/apache2/suexec FastCgiIpcDir /var/lib/apache2/fastcgi </IfModule> 我正在使用这个非常简单的示例脚本来testing设置: #include <iostream> using namespace std; int main() { cout<<"Content-type: text/plain"<<endl<<endl; cout<<"Hello World!"<<endl; […]
我试图在Win2008r2服务器上安装MediaWiki,但无法安装PHP。 以下是我所做的: 抓住PHP的Zip存档并解压到C:\ PHP。 创build了两个子目录:c:\ PHP \ sessiondata和c:\ PHP \ uploadtemp。 授予对子目录的IUSR帐户的修改权限。 复制php.ini生产为php.ini 编辑php.ini并做了以下更改: fastcgi.impersonate = 1 cgi.fix_pathinfo = 1 cgi.force_redirect = 0 open_basedir = "c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata" extension = php_mysql.dll extension_dir = "./ext" upload_tmp_dir = C:\PHP\uploadtemp session.save_path = C:\php\sessiondata 安装Web服务器angular色,selectCGI和HTTPredirect选项。 在Handler映射中: 新增模块映射。 input以下值: Path = * .php,Module = FastCgiModule,Executable = c:\ php \ php-cgi.exe,Name = PHP通过FastCGI。 […]
我目前使用Apache 2.0和FastCGI来服务我的Django站点(我从一台服务器/ IP托pipe多个站点)。 每个站点都有它自己的FastCGI进程,它会阻止Apache分叉多个可以使用大量内存的副本,这意味着我可以在不重新启动Apache的情况下重新启动单个Django站点。 这是一个明智的做事方式,还有其他更好的select吗?
如果我有一台运行Apache的服务器,并且安装了FastCGI,那么是否可以运行Ruby和Python脚本? 如果服务器上已经安装了Python,是不是可以将.py添加到httpd.conf文件中的CGI部分来使Python脚本工作? 对于Ruby和Java,如果安装了Ruby和Java,是否消除了对Mongrel和Tomcat的需求? 除非我错过了一些东西,FastCGI似乎只能让你做你已经做的事情。
我有一个用PHP完成的Web产品,理论上应该支持很多用户。 问题是,我刚刚离开了Apache,发现它只是作为CGI运行。 这是非常错误的,我应该做的fastcgi或只是把它保持原样?
我有一个单独的域,其中根由uWSGI下运行的python应用程序提供服务。 然而,我需要在子文件夹/论坛/上运行PHP论坛。 我在apps-availableconfiguration文件中有以下内容: location / { try_files $uri @oath; } location @oath { include uwsgi_params; uwsgi_pass 127.0.0.1:3031; } location /forum/ { alias /home/drake/forum; index index.php; } location ~ /forum/(.*)\.php { include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; } 然而, example.com/forum/ forum/被发送到uWSGI应用程序和example.com/forum/index.php ,同时被交给FastCGI,返回File not found. 并将以下内容logging到error.log : 2013/03/03 00:10:52 [error] 28102#0: *1 FastCGI sent in stderr: […]
我需要两套不同的上游。 但是我所有的请求都来自同一个URL(相同的path)。 不同的是,一些请求会有一个特殊的说法,有些则不会。 根据这一点,我需要select使用哪个上游。 这是我的configuration文件的一个例子不完整的部分: server_name localhost; root /var/www/something/; upstream pool1 { server localhost:5001; server localhost:5002; server localhost:5003; } upstream pool2 { server localhost:6001; server localhost:6002; server localhost:6003; } location / { # this is the part where I need help try_files $uri @pool1; } location @pool1 { include fastcgi_params; fastcgi_pass pool1; } location @pool2 […]
nginx安装随附的/etc/nginx/sites-available/default文件具有以下内容: # You may add here your # server { # … # } # statements for each of your virtual hosts to this file ## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. […]
亲爱的ServerFault社区,我设法使我的网站进入一个全function状态两天前..大约3小时前,今天,我已经重新启动我的Linux机器,并发现我的网站不再工作。 我不知道这是为什么,坦率地说,我只是不认为我现在正在解决它的水平 – 我真的可以做你的帮助:) 基本上我所有的Nginx的PHP文件呈现为空白或陈述'权限被拒绝' 前几天PHP-FPM工作正常…现在我得到这个错误! 自从我今天重新启动以来,我的网站一直在正常工作! 格儿。 看我的错误日志,我可以看到: while reading response header from upstream '2014/12/09 21:35:50 [error] 1945#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Unable to open primary script: /usr/share/nginx/html/phpinfo.php (Permission denied)" while reading response header from upstream, client: […]
我已经使用yum安装了FastCGI,并编辑了我的lighttpd.conf,但重新启动服务器时收到此错误。 2009-06-24 12:44:43: (log.c.97) server started 2009-06-24 12:44:43: (mod_fastcgi.c.924) bind failed for: unix:/var/run/lighttpd/php-fastcgi.socket-0 No such file or directory 2009-06-24 12:44:43: (mod_fastcgi.c.1365) [ERROR]: spawning fcgi failed. 2009-06-24 12:44:43: (server.c.902) Configuration of plugins failed. Going down. 我的lighttpd.conf的相关部分是: fastcgi.server = ( ".php" => ( "localhost" => ( #"socket" => "/var/run/lighttpd/php-fastcgi.socket", #"bin-path" => "/usr/bin/php-cgi" "socket" => "/tmp/php-fastcgi.socket", "bin-path" => […]