我设置启用了chroot的php-fpm。 现在我看到有两种select,我想知道确切的区别是什么。 该设置有: chroot = /var/www/domains/domain.tld/ ; Chdir to this directory at the start. This value must be an absolute path. ; Default Value: current directory or / when chroot chdir = /docroot/ 为什么在这里有两个不同的位置,哪个path是PHP允许访问。 php网站可以访问/var/www/domains/domain.tld/ ,还是只能访问docroot目录下的文件。 === 也许对我有一些具体的build议。 我想有一个像这样的设置: webroot位置: /var/www/ domain.com/ |—conf/ | |–nginx.conf | |–php-fpm.conf | |—ssl/ |—logs/ |—session/ |—domains/ |—www/ |—app/ |—dev/ […]
我已经使用nginx + php-fpm安装了testing服务器。 我已经尝试了以下所有内容: Nginx + Php5-fpm不能渲染php文件 nginx + PHP的PHP – > 404 PHP页面 – 文件未find 当访问PHP文件时,nginx会抛出404错误 总结我所尝试的: 重新安装。 更改脚本权限(将其更改为0777 )。 fastcgi_intercept_errors on 。 检查root指令的级别: server , location和location ~ \.php 。 检查了fastcgi_param SCRIPT_FILENAME指令。 服务器在(并且只在) .php脚本上返回404。 我可以重命名为.html ,他们会没事的。 我怎样才能解决这个问题? 这是我的nginx.conf : user nginx; worker_processes 1; error_log /var/log/nginx/error.log; pid /run/nginx.pid; events { worker_connections 1024; } http { […]
在这里使用Ubuntu 12.04,nginx和php5-fpm 我有mongo在php 5.3上运行良好,然后我添加了ondrej / php5 ppa并更新到php5.4。 它保持GD和CURL扩展,但不是mongo。 我重新将该行添加到php.ini文件,并没有。 然后我启用启动错误,并得到这个: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/mongo.so' – /usr/lib/php5/20100525/mongo.so: cannot open shared object file: No such file or directory 所以,疯狂的猜测,我find -name 'mongo.so' ,并将文件从20090626 /移动到20100525 / …导致此错误: PHP Startup: mongo: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These […]
我有nginx + php-fpm web服务器 所以我注意到在php5-fpm.log中有很多奇怪的行: [03-Sep-2013 09:25:23] NOTICE: [pool www] child 23999 exited with code 0 after 321.832329 seconds from start [03-Sep-2013 09:25:23] NOTICE: [pool www] child 24082 started [03-Sep-2013 09:25:41] NOTICE: [pool www] child 24032 exited with code 0 after 259.247887 seconds from start [03-Sep-2013 09:25:41] NOTICE: [pool www] child 24083 started [03-Sep-2013 09:25:47] […]
我运行PHP-FPM和Nginx,偶尔出于任何原因,我必须重新启动服务器。 一旦服务器再次运行,nginx服务会自动启动,但是PHP-FPM不会。 当我在sudo /etc/init.d/php-fpm restart后立即运行sudo /etc/init.d/php-fpm restart命令时,可以看到这个结果: $ sudo /etc/init.d/php-fpm restart Stopping php-fpm: [FAILED] Starting php-fpm: [ OK ] 这是预期的行为? 什么是使PHP-FPM自动启动的最佳方式? 在任何地方有configuration选项,还是必须将命令添加到其中一个Linux启动脚本? 谢谢。
我在这里searchserverFault分配,发现这个解决scheme… 包括在虚拟主机应该工作: php_admin_flag register_argc_argv = On php_value max_execution_time = 1000 php_value session.gc_maxlifetime = 15000 php_admin_flag magic_quotes_gpc = on 但比它曙光我,我根本不使用mod_php。 我已经安装了php-fpm。 如果我的方法可行,或者如果有其他方法,我真的找不到任何信息… 那么,如果我使用了php-fpm,并且想要为虚拟主机设置不同的设置,我该怎么办? S.
我讨厌configurationnginx。 这太复杂了 我如何让PHP在我的用户目录中工作? 这里是我的nginx.conf的相关部分: location ~ ^/~(.+?)(/.*)?$ { autoindex on; autoindex_exact_size off; alias /home/$1/public_html$2; location ~ \.php { include /etc/nginx/fastcgi.conf; fastcgi_intercept_errors on; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; } } 这给了我错误: FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream在nginx错误日志中FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream 。 […]
我试图用DAViCal设置nginx。 然而,我得到了一个“文件未find”与“发送stderr FastCGI:”主要脚本未知“在日志。看起来有什么错我的别名,但我确定无法弄清楚。 我的虚拟主机: server { listen 80; ## listen for ipv4; this line is default and implied listen [::]:80 default_server ipv6only=on; ## listen for ipv6 root /var/www-data; index index.html index.htm index.shtml index.php; # Make site accessible from http://localhost/ server_name just.a.server; location / { # First attempt to serve request as file, then # as […]
我试图找出PHP错误在我的设置中。 我正在运行nginx作为PHP-FPM的反向代理,但是我没有看到我的应用正在生成的各种E_NOTICE或E_WARNING消息。 我知道他们正在发生的唯一原因是失败的响应和NewRelic捕捉堆栈跟踪。 这里是日志configuration: nginx.conf proxy_intercept_errors on; fastcgi_intercept_errors on; php.ini中 error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On track_errors = On error_log = syslog PHP-fpm.conf [global] error_log = /var/log/php-fpm/fpm-error.log [www] access.log = /var/log/php-fpm/access.log access.format = "%t \"%m %r%Q%q\" %s […]
我用nginx和php-fpm安装了Fedora 16。 一切工作都很好。 所有日志与PHP通知,warnig错误等在/var/log/php-fpm/www-error.log。 有没有办法将php-fpmconfiguration为错误日志文件configuration为适当的日志文件错误? 所以我想logging每个虚拟主机不在一个全局文件的PHP错误。 (如在Apache和PHP)。