- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
请帮忙。
我一直在尝试在 CentOS 6.4 上配置 FastCGI + php-fpm。
最后它可以工作了,但是 Apache 日志中有一些错误。我想了解它们并摆脱它们。
这是我在全新安装 CentOS (minimal) + MySQL + Apache2 + PHP 后所做的:
# echo "" > /var/log/httpd/error_log
# service httpd restart
# cat /var/log/httpd/error_log
[Fri Apr 26 05:06:49 2013] [notice] caught SIGTERM, shutting down
[Fri Apr 26 05:06:50 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Apr 26 05:06:50 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Apr 26 05:06:50 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 26 05:06:50 2013] [notice] Digest: done
[Fri Apr 26 05:06:50 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
# yum -y install php-fpm
# chkconfig --levels 235 php-fpm on
# service php-fpm start
# /etc/init.d/php-fpm status
php-fpm (pid 1644) running...
# cat /var/log/php-fpm/error.log
[26-Apr-2013 05:07:17] NOTICE: fpm is running, pid 1644
[26-Apr-2013 05:07:17] NOTICE: ready to handle connections
# yum -y install wget make gcc libtool httpd-devel apr-devel apr
# wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
# tar xf mod_fastcgi-current.tar.gz
# cd mod_fastcgi-2.4.6
# make -f Makefile.AP2 top_dir=/usr/lib/httpd
# cp .libs/mod_fastcgi.so /usr/lib/httpd/modules/
# mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.disabled
# mkdir /var/www/fastcgi
# cat > /etc/httpd/conf.d/fastcgi.conf <<EOF
# LoadModule fastcgi_module modules/mod_fastcgi.so
# FastCgiWrapper Off
# DirectoryIndex index.php index.html index.shtml index.cgi
# Alias /phpfpm /var/www/fastcgi/phpfpm
# AddType application/x-httpd-php .php
# Action application/x-httpd-php /phpfpm
# FastCgiExternalServer /var/www/fastcgi/phpfpm -host 127.0.0.1:9000 -flush -pass-header Authorization
# EOF
# setsebool httpd_can_network_connect on
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Fri Apr 26 05:07:33 2013] [notice] caught SIGTERM, shutting down
[Fri Apr 26 05:07:34 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Apr 26 05:07:34 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Apr 26 05:07:34 2013] [error] (13)Permission denied: FastCGI: apr_dir_open() failed
[Fri Apr 26 05:07:34 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 26 05:07:34 2013] [notice] Digest: done
[Fri Apr 26 05:07:34 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:07:34 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:07:34 2013] [notice] FastCGI: process manager initialized (pid 1841)
[Fri Apr 26 05:07:34 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Fri Apr 26 05:10:05 2013] [notice] caught SIGTERM, shutting down
[Fri Apr 26 05:10:05 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Apr 26 05:10:05 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Apr 26 05:10:05 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 26 05:10:05 2013] [notice] Digest: done
[Fri Apr 26 05:10:05 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [notice] FastCGI: process manager initialized (pid 1866)
[Fri Apr 26 05:10:05 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Tue Apr 30 12:02:52 2013] [notice] caught SIGTERM, shutting down
[Tue Apr 30 12:02:53 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 30 12:02:53 2013] [notice] Digest: done
[Tue Apr 30 12:02:53 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [notice] FastCGI: process manager initialized (pid 1769)
[Tue Apr 30 12:02:53 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
# ls -ld /etc/httpd/logs/fastcgi/dynamic
drwx------. 2 apache apache 4096 Apr 26 05:07 /etc/httpd/logs/fastcgi/dynamic
# chmod 777 /etc/httpd/logs/fastcgi/dynamic
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Tue Apr 30 12:18:44 2013] [notice] caught SIGTERM, shutting down
[Tue Apr 30 12:18:44 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:18:44 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 30 12:18:44 2013] [notice] Digest: done
[Tue Apr 30 12:18:44 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:18:44 2013] [notice] FastCGI: process manager initialized (pid 1888)
[Tue Apr 30 12:18:44 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
最佳答案
你做了
# chmod 777 /etc/httpd/logs/fastcgi/dynamic
# chmod -R a+rX /etc/httpd/logs
# chmod -R a+w /etc/httpd/logs/fastcgi
关于CentOS 6.4 上的 Apache2 + FastCGI + php-fpm ==> 有效,但 error_log 中出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16227694/
我对 FastCGI 的工作原理有点困惑。我的程序真的只有一个实例在运行,还是有一些神奇的线程在运行?这很重要,因为如果我的数据结构的范围在主循环之外,我需要知道这些数据结构是否需要是线程安全的。 编
FastCGI 很旧,但在某些情况下它似乎仍然是正确的答案。 似乎 Perl/Catalyst Web 应用程序的首选部署是使用 FastCGI。 FastCGI 在 Rails 中很流行,但现在似乎
除了建立 TCP 连接之外,如何检查 FastCGI 服务器是否处于事件状态并正常运行? 我有许多远程、独立的 FastCGI 服务器。我想监控 FastCGI 服务器本身以确保其存活。简单地向 We
我今天在 Cherokee 上设置 Django(使用 SCGI),我注意到 the Django docs假设您可以使用主机/端口组合或套接字在网络服务器和 Django 之间进行通信。 他们在这件
httpd 配置文件可以有多少个 fastcgi 处理程序?我想设置 httpd 服务器来服务器在不同 tcp 套接字上运行的多个 fastcgi 程序。例如:http://uwsgi-docs.re
我已经将 Web 服务器配置为通过命名管道使用“远程”fastCGI 应用程序(它实际上位于同一台 Windows 主机上)。我现在正试图找出如何启动 fastCGI 应用程序以使用此管道,但我不确定
我正在写 FastCGI wire protocol implementation in C (还导出了一个用于编写应用程序服务器的更高级别的 C++ 接口(interface))并且我已经完成了足够
我理解 FastCGI 在性能方面优于其他网关接口(interface)的目的。但是,如果实现 FastCGI 的库已经不得不通过艰苦的措施来实现安全高效的 TCP 服务,为什么不直接将应用程序编写为
我正在使用 nginx、factcgi 和 spawn-fcgi 并试图让它工作。 我按如下方式启动 spawn-fcgi: g++ rtbTimeSeries.cpp -o forecast.fcg
我有一个 FastCGI Perl 网络应用程序(使用 CGI::Fast 编写,但这应该无关紧要),我想在FastCGI 模式下进行测试。 我可以使用什么 Perl 模块来运行 FastCGI 应用
谁能提供我一步一步的方式,我可以运行apache2在快速-cgi上ubuntu 22.10,我尝试了几件事,但我得到一个空白页或错误,我是在新安装的Apache2服务器实例。。Thnx!。尝试了很多东
我正在构建一个 C++ API,我想将其作为 Web 服务提供。我正在考虑使用 REST API,并决定使用 FastCGI 或 FastCGI C++ 在 C++ API 和 Web 服务器之间进行
我试图添加 try_files 来检查 php 文件是否存在,但它给了我错误。 "try_files" directive is duplicate in /etc/nginx/snippets/fa
我计划在Rebol(目前在Apache 2上为CGI)中编写一个相当不错的Web应用程序,但是最初的性能测试却非常令人沮丧。在应用程序上运行apache基准测试时,我仅得到4-5个请求/秒。我想知道其
我正在使用 web.py、spawn_fcgi 和 nginx 在 Python 中编写 Web 应用程序。 假设我在 nginx 中有这个配置块: location / { include
我正在实现一个 fastcgi 应用程序,在阅读了 fastCGI 规范后,我发现了一个名为“请求多路复用”的功能。它让我想起了 Adobe RTMP 多路复用在协议(protocol)是专有和封
我一直在尝试实现Web服务器网关(出于娱乐和教育目的),并且对于前叉模型,我对FastCGI/SCGI背后的核心体系结构有一些疑问。 FastCGI/SCGI实现如何处理前叉场景中的通信? AFAIK
我编写了一个简单的 Perl 脚本,通过 Apache 上的 fastCGI 运行该脚本。该应用程序加载一组 XML 数据文件,这些文件用于根据传入请求的查询参数查找值。据我了解,如果我想增加应用程序
我正在尝试使用FastCGI(和restcgi)开发简单的RESTful api。当我尝试实现 POST 方法时,我注意到输入流(表示请求正文)是错误的。我做了一个小测试,看起来当我尝试读取流时,只收
我正在运行 2 个不同的 php 版本。它们运行良好,但没有连接到 mysql,我不知道为什么。它们应该是,但我不知道如何强制它们连接 mysql。 php版本是5.3.27和5.4.31如果您需要更
我是一名优秀的程序员,十分优秀!