httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel <dferra...@gmail.com>
Subject Re: [users@httpd] Cannot troubleshoot php-fpm with apache
Date Tue, 08 Aug 2017 08:43:48 GMT
yes, php values can't be defined in apache config, you define them in
the fpm pool.

IIRC the php-fpm error logs get written with the user the fpm pool has
defined, in your case "apache" should have write permissions in the
/var/log/php-fpm/ to be able to write www-error.log.

about php configurations, yes, just define them in each pool and
create one pool for each different case you need, that's what php-fpm
is all about.

2017-08-08 9:42 GMT+02:00 Nikolaos Milas <nmilas@noa.gr>:
> On 8/8/2017 9:47 πμ, Daniel wrote:
>
>> php_ directives belong to "mod_php" if you are proxying to php-fpm
>> through fastcgi all related php logging and defined variables belong
>> in the corresponding FPM pool.
>>
>> I would start by seeing what php-fpm has to say about those connections.
>
>
> Thank you Daniel,
>
> You mean that the php_flag and php_value settings in the vhost configuration
> will not apply?
> If so, how can I pass particular php_value settings on a per vhost basis?
>
> As I wrote, the problem is that I don't see any php logging even in the
> php-fpm logs for this vhost!
>
> For your reference, I am also including the php-fpm configuration, in case
> you (or anyone) can advise me on something:
>
>    # cat /etc/php-fpm.d/www.conf
>
>    include=/etc/php-fpm.d/*.conf
>
>    [global]
>    pid = /run/php-fpm/php-fpm.pid
>
>    error_log = /var/log/php-fpm/error.log
>    log_level = debug
>    daemonize = yes
>
>    [www]
>
>    user = apache
>    group = apache
>
>    listen = 127.0.0.1:9000
>    listen.allowed_clients = 127.0.0.1
>
>    pm = dynamic
>    pm.max_children = 50
>    pm.start_servers = 2
>    pm.min_spare_servers = 2
>    pm.max_spare_servers = 4
>    pm.process_idle_timeout = 10s;
>    pm.max_requests = 500
>    pm.status_path = /fpm-status
>
>    slowlog = /var/log/php-fpm/www-slow.log
>    request_slowlog_timeout = 5s
>    request_terminate_timeout = 20s
>
>    catch_workers_output = yes
>
>    security.limit_extensions = .php .php3 .php4 .php5 .php7 .htm .html
>
>    php_admin_value[error_log] = /var/log/php-fpm/www-error.log
>    php_admin_flag[log_errors] = on
>    php_value[session.save_handler] = files
>    php_value[session.save_path]    = /var/lib/php/session
>    php_value[soap.wsdl_cache_dir]  = /var/lib/php/wsdlcache
>
>    php_admin_value[post_max_size] = 40M
>    php_admin_value[short_open_tag] = On
>
>    php_value[date.timezone] = "Europe/Athens"
>
> Thanks,
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com
linkedin     es.linkedin.com/in/danielferradal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message