Category Archives: Pro Workstation

How to use command line to change your default browser to Firefox in Ubuntu ?

Just use the command
# update-alternatives --config x-www-browser
Il existe 2 choix pour l'alternative x-www-browser (qui fournit /usr/bin/x-www-browser).

Sélection Chemin Priorité État
------------------------------------------------------------
* 0 /usr/bin/chromium-browser 40 mode automatique
1 /usr/bin/chromium-browser 40 mode manuel
2 /usr/bin/firefox 40 mode manuel

Appuyez sur pour conserver la valeur par défaut[*] ou choisissez le numéro sélectionné :2

Then it is done!

how to migrate a website without breaking access for final users

Here is a short tutorial and a useful tip when you plan to migrate a website from a server to another (production servers), in order to avoid to have an interruption during migration:

The process

  • Setup the new server (apache, mysql, etc…)
  • Dump the database, copy files of the websites from the old server to the new one
  • Finalize the setup

When the migration of the website is done, find below how you can test the website with the definitive domain without changing immediately DNS configuration: you can bypass DNS server from your computer. To do so, just add some lines to your file /etc/hosts:

# vim /etc/hosts
ip.adress.new.server   your-domain.com

And save it.

Then you will be able to test locally from your laptop your new website with the real definitive domain.
Other users from the internet will still be directed to the old server as DNS change is not done.
When you checked locally that everything was OK, then you can delete the line in your /etc/hosts and modify the DNS configuration.
When propagation will be done (wait 48 hours at least), then you can deactivate the old server.