File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed
container/root/etc/nginx/sites-available Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ RUN phpenmod overrides && \
122122 sed -i "s/listen [0-9]*;/listen ${CONTAINER_PORT};/" $CONF_NGINX_SITE && \
123123 # Enable NewRelic via Ubuntu symlinks, but disable via extension command in file. Allows cross-variant startup scripts to function.
124124 phpenmod newrelic && \
125- sed -i 's/extension\s\? =/;extension =/' $CONF_PHPMODS/newrelic.ini
125+ sed -i 's/extension\s\? =/;extension =/' $CONF_PHPMODS/newrelic.ini && \
126+ # Enable status page at "/__status"
127+ sed -i 's/;pm.status_path = .*/pm.status_path = \/ __status/' $CONF_FPMPOOL
126128
127129RUN goss -g /tests/php-fpm/ubuntu.goss.yaml validate && \
128130 /aufs_hack.sh
Original file line number Diff line number Diff line change @@ -142,7 +142,9 @@ COPY ./container/root /
142142
143143# Make additional hacks to migrate files from Ubuntu to Alpine folder structure
144144RUN cp /etc/php/7.0/mods-available/* $CONF_PHPMODS && \
145- rm $CONF_PHPMODS/00_opcache.ini
145+ rm $CONF_PHPMODS/00_opcache.ini && \
146+ # Enable status page at "/__status"
147+ sed -i 's/;pm.status_path = .*/pm.status_path = \/__status/' $CONF_FPMPOOL
146148
147149RUN goss -g /tests/php-fpm/alpine.goss.yaml validate && \
148150 /aufs_hack.sh
Original file line number Diff line number Diff line change @@ -130,7 +130,9 @@ RUN cp /etc/php/7.0/mods-available/* $CONF_PHPMODS && \
130130 sed -i "s/listen [0-9]*;/listen ${CONTAINER_PORT};/" $CONF_NGINX_SITE && \
131131 # Enable NewRelic via Ubuntu symlinks, but disable in file. Cross-variant startup script uncomments with env vars.
132132 phpenmod newrelic && \
133- sed -i 's/extension\s\?=/;extension =/' $CONF_PHPMODS/newrelic.ini
133+ sed -i 's/extension\s\?=/;extension =/' $CONF_PHPMODS/newrelic.ini && \
134+ # Enable status page at "/__status"
135+ sed -i 's/;pm.status_path = .*/pm.status_path = \/__status/' $CONF_FPMPOOL
134136
135137RUN goss -g /tests/php-fpm/beta.goss.yaml validate && \
136138 /aufs_hack.sh
Original file line number Diff line number Diff line change @@ -44,6 +44,15 @@ server {
4444 fastcgi_pass 127.0.0.1:9000;
4545 }
4646
47+ # Allow locally-accessible (only) FPM status page
48+ location ~ ^/__status$ {
49+ access_log off;
50+ allow 127.0.0.1;
51+ deny all;
52+ include fastcgi_params;
53+ fastcgi_pass 127.0.0.1:9000;
54+ }
55+
4756 # Protect against accessing hidden files
4857 location ~ /\. {
4958 access_log off;
You can’t perform that action at this time.
0 commit comments