Laravel on Twitter: “Announcement: Laravel 5.1 will be the first Laravel LTS release in the framework’s history.”

Nginx and PHP-FPM status pages from subdomains

Here are two nginx configurations I am using to get the basic status of the two servers by loading different subdomains:

PHP-FPM status page from subdomain.yoursite.com:

server {
 
  listen 80;
  server_name subdomain.yoursite.com;

  location / {
    rewrite .* /fpm-status;
  }

  location /fpm-status {
    auth_basic "Restricted";
    auth_basic_user_file /path/to/.htpasswd;
    fastcgi_pass 172.17.42.1:9000;
    include fastcgi_params;
  }

}

Nginx status page from subdomain2.yoursite.com:

server {

  listen 80;
  server_name subdomain2.yoursite.com;

  location / {
    auth_basic "Restricted";
    auth_basic_user_file /path/to/.htpasswd;
    stub_status on;
  }

}

How to increase the timeouts when using Nginx, PHP-FPM and phpMyAdmin

Today I needed to change some tables’ structures using phpMyAdmin.

To my surprise not long after I clicked Go to execute the queries, many errors started comming from nginx and php.

So I started looking around about any timeout settings I can use in nginx and php5-fpm and the final working result is this (I choose a timeout of 600 seconds):

/etc/php5/fpm/php.ini

max_execution_time = 600

/etc/php5/fpm/pool.d/www.conf

request_terminate_timeout = 600

in nginx conf of my site inside the *.php location settings:

fastcgi_read_timeout 600;

reload/restart your php and nginx servers for the new changes to take effect and you are ready. Test it by executing some queries that you know will take more time than usual.

Here’s a good source and more settings and information.

If you’re going to change the nginx and php settings of the servers running inside Docker containers you better use this syntax:

servername reload

instead of:

servername restart

Or your container may be automatically stopped after the restart is executes as the restart command is just short for: stop->start.

Cloudflare:

if you’re using phpMyadmin behind Cloudflare, check their thoughts about that: https://support.cloudflare.com/hc/en-us/articles/200171926-Error-524