修改 php.ini

nano /etc/php5/fpm/php.ini

修改

max_execution_time = 300

修改 PHP-FPM

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

修改

request_terminate_timeout = 300

修改 Nginx 配置文件

nano /etc/nginx/sites-available/default

添加或修改

location ~ \.php$ {
	include /etc/nginx/fastcgi_params;
        fastcgi_pass  unix:/var/run/php5-fpm.sock;
	fastcgi_read_timeout 300; 
}

 重启服务

service php5-fpm reload

service nginx reload