First "Apply configuration changes" problem

Hello!

After installation FreePBX I tried to press “Apply Configuration Changes” at first time. And got “Error: Did not receive valid response from server” .

On server I use suphp module, apache2, asterisk 1.4.39.1 FreePBX 2.8.1

in Apache logs I see:

Script timed out before returning headers: config.php, referer: http://mysite/admin/config.php#

Could you please help me what I should check?

/usr/bin/php -q /var/lib/asterisk/bin/retrieve_conf
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = amp111
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = asteriskuser
Added to globals: AMPDBPASS = oss9417
Notice: no Queues defined
Notice: no Conferences defined
Notice: no Parking Lots defined
Notice: no sip trunks defined
Notice: no iax trunks defined
Notice: no AMP Users defined
Please update your modules and reload Asterisk by browsing to your server.