Centos to Ubuntu migration (with Ubuntu problem)

Hi All,
I need to migrate a fully functional Freepbx distro (installed with USB pendrive image, 4.211.64-7 CentOS 6.4) to an Ubuntu 12.04.3 LTS server machine.

Freepbx/Asterisk was installed on Ubuntu following this guide:


The freepbx version seems the same as centOS system

The first issue found after all was done without errors, is GUI not accessible by typing


instead i have to use


something wrong with apache/freepbx path not documented ??

the major problem is that a backup just done on the original CentOS machine cannot be restored on the new Ubuntu machine

Simply , going on admin->backup&restore and selecting restore and the file to be restored , produces absolutely nothing
the loading progression ends with nofurther actions.

No errors were found on freepbx.log

Any suggestion ?

Thank you

If you actually followed the instructions instead of just blindly copying and pasting you would have seen “./install_amp --webroot /var/www/freepbx” which shows that it gets installed into the freepbx folder. if you didnt want that then just do: “./install_amp --webroot /var/www”

Thanks for reply

Yes , blind-copy is what a newbie or little-experienced user can only do…
Anyway a little more attention would suggest that path…
Anyway, I don’t see why that guide says:

Start FreePBX
http://yourlocalipaddress/html or if you prefer http://localhost/admin

A coment 8 hours ago on that page reports my same problem (and Andrew Nagy suggest the problem override)
They should correct that document…

Any idea about the failed restore ???

Andrew Nagy is TM1000

HIHI !!!

Anyway I found a php POST lenght error on apache error log when trying to upload the restore file
On my /etc/php5/apache2/php.ini , line 740 it was
post_max_size = 8M

Changed to 120M , upload of restore file now ends correctly but a new “upload error” is present (this time with no errors on any log)

So I downloaded the whole backup with winscp and uploaded to the new machine
Next the restore was done using the local storage and all seems OK now.

Just the last issue:

Before restore, the fresh installation of freepbx on Ubuntu had the identical fashioned web gui as the centOS one
After restoring the centOS backup un new ubuntu machine , GUI has lost the rounded cyan buttons , they become simple columns of text in background of graphic pages.
Any idea on what to check ??

ssh to server, run:

amportal a r

It doesn’t help…

Any other idea or what to check to restore CSS ??
I tried any sort of reload and flushing (server side and browser side), no luck…
Just to remember, fresh freepbx installation on ubuntu 12.04 server, all CSS ok, restore just done with a file coming from 4.211.64-7 (centOS usb iso): restore ok but CSS broken


Andrew’s fix above should regenerate our minified css. Given that it didn’t help in the specific situation, what version of framework are you running (2.11.?)? Next can you do the following:

  1. Connect to your server via ssh
  2. Navigate to [freepbx-webroot]/admin/assets/css
  3. Do you have a file that looks like mstyle_autogen_[timestamp].css? Post the filename back here with the output requested below.
  4. Run the following and post the output:

    echo “SELECT value FROM freepbx_settings WHERE keyword = ‘mainstyle_css_generated’” | amportal a m

thanks for reply

the file on css directory is mstyle_autogen_1389175932.css
while the one returned from amportal command is mstyle_autogen_1381266057.css

I suppose the mismatch is the cause of no CSS , what to do then ???
Thank you again


amportal chown
amportal a r

it doesn’t work but I discovered why:

as I installed freepbx on ubuntu following the guide, i installed with:
./install_amp --webroot /var/www to avoid the installation on /var/www/freepbx directory , like proposed in the guide.
Guide also says:
mkdir /var/www/html
chown -R asterisk. /var/www/

now, after restore from centos file, I found :

a /var/www/html/admin directory
and a /var/www/admin directory

both containing the same files

the /var/www/html/admin/assets/css contains the same mystyle_autogen given by the
echo “SELECT value FROM freepbx_settings WHERE keyword = ‘mainstyle_css_generated’” | amportal a m
command, but the actual freepbx version points tho the other directory

I think now I should re-check the installation directory made by hand with the one pointed to the original backup file…

Any other suggestion is well accepted…


The different distro directory mismatching was the problem
Reinstalled on ubuntu with:
./install_amp --webroot /var/www/html solved the problem and now the backup from centos match the right directories.

The only issue remaining (for now) is I have to type http://pbxaddress/html/admin to access the GUI, while on centOS it’s enough to type http://pbxaddress or http://pbxaddress/admin
And this despiting the fact the directories structure is now the same:
probably a different apache2 configuration ?? (any idea?)
Thank you for your support guys.


It’s all in your /etc/apache2/sites-enabled/default* settings (symlinks here, be careful what you edit them with :wink: )

OK done
Thank you