In case someone else is having the same problem, most likely the max_execution_time is exceeded while the script runs. This can be confirmed by checking the response of the "start" request in the console (will be a 500 error) and the log file in /var/log/apache2/error.log
Just edit your php.ini and set the value from the original 30 seconds to something like 360 seconds.
The php.ini that you are using can be found using phpinfo() (php) or php --info (cli).
Magento2 contains NGINX config nginx.conf.sample that can be included in you server section. Let's try with minimal configuration;
You need to modify /etc/nginx/sites-available/my-domain.com with the following content:
upstream fastcgi_backend {
# socket
# server unix:/var/run/php5-fpm.sock;
server unix:/var/run/php/php7.0-fpm.sock;
# use tcp connection
# server 127.0.0.1:9000;
}
server {
listen 80;
server_name www.my-domen.com;
return 301 $scheme://www.my-domen.com$request_uri;
}
server {
listen 80 reuseport;
server_name my-domen.com;
set $MAGE_ROOT /var/www/my-domen.com/html;
set $MAGE_MODE developer;
# set $MAGE_MODE default;
# set $MAGE_MODE production;
include /var/www/my-domen.com/html/nginx.conf.sample;
fastcgi_read_timeout 3000;
}
and then add other settings do not relate to Magento
Best Answer
Try to increase value of
max_execution_time
in PHP to 1800 (30 minutes).