File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ RUN pecl install igbinary-1.2.1 && \
4848
4949# Prevent newrelic daemon from auto-spawning; uses newrelic run.d script to enable at runtime, when ENV variables are present
5050# @see https://docs.newrelic.com/docs/agents/php-agent/advanced-installation/starting-php-daemon-advanced
51- RUN sed -i "s/;newrelic.daemon.dont_launch = 0/newrelic.daemon.dont_launch = 3/" /etc/php5/mods-available/newrelic.ini
51+ RUN sed -i "s/;newrelic.daemon.dont_launch = 0/newrelic.daemon.dont_launch = 3/" /etc/php5/mods-available/newrelic.ini && \
52+ sed -i "s/listen = \( .*\)\+ /listen = 127.0.0.1:9000/" /etc/php5/fpm/pool.d/www.conf
53+ # ^^ Configure php-fpm to use TCP rather than unix socket (for stability), fastcgi_pass is also set by /etc/nginx/sites-available/default
5254
5355# Perform cleanup, ensure unnecessary packages are removed
5456RUN apt-get autoclean -y && \
Original file line number Diff line number Diff line change @@ -27,9 +27,11 @@ server {
2727
2828 include /etc/nginx/fastcgi_params;
2929
30+ fastcgi_read_timeout 60;
31+
3032 # IMPORTANT: PATH_INFO is set to empty string in this configuration
3133 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
32- fastcgi_pass unix:/var/run/php5-fpm.sock ;
34+ fastcgi_pass 127.0.0.1:9000 ;
3335 }
3436
3537 # Protect against accessing hidden files
Original file line number Diff line number Diff line change 33
44memory_limit = 192M
55max_execution_time = 60
6+ request_terminate_timeout =60
67
78; TODO: Closes potential security hole, but doesn't allow ANY requests through
89; @see [CAUSE] https://nealpoole.com/blog/2011/04/setting-up-php-fastcgi-and-nginx-dont-trust-the-tutorials-check-your-configuration/
You can’t perform that action at this time.
0 commit comments