Skip to content

Commit

Permalink
add templating for status path and ping path
Browse files Browse the repository at this point in the history
  • Loading branch information
axos88 committed Nov 30, 2016
1 parent df3c873 commit df36805
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions definitions/php_fpm_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
:request_slowlog_timeout => params[:request_slowlog_timeout] || false,
:php_options => params[:php_options] || {},
:request_terminate_timeout => params[:request_terminate_timeout],
:status_path => params[:status_path]
:ping_path => params[:ping_path]
:params => params
)
notifies :restart, "service[php-fpm]"
Expand Down
8 changes: 8 additions & 0 deletions templates/default/pool.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ pm.max_requests = <%= @max_requests || 500 %>
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
<% if @status_path %>
pm.status_path = <%= @status_path %>
<% else %>
;pm.status_path = /status
<% end %>

; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
Expand All @@ -248,7 +252,11 @@ pm.max_requests = <%= @max_requests || 500 %>
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
<% if @ping_path %>
pm.ping_path = <%= @ping_path %>
<% else %>
;ping.path = /ping
<% end %>

; This directive may be used to customize the response of a ping request. The
; response is formatted as text/plain with a 200 response code.
Expand Down

0 comments on commit df36805

Please sign in to comment.