Saturday, January 7, 2012

Nginx Upgrade Deletes/Overwrites Configuration Folder

After an Nginx upgrade, the browser can't
connect to your server , yet your servers are
running and the error logs are OK
I was recently upgrading Nginx on Linux, and after the upgrade, I noticed that all my sites were unavailable, giving the error "couldn't establish connection to the server". 

The next thing is panicking, and going through the logs to see what could have gone wrong. The logs claim to have no idea of any error, or wrong doing, and you are still clueless.

It took me a while to find out that my server configurations, stored under the /etc/nginx/conf folder in a file named default.conf  had disappeared , and the file was blank.

It took me a while, and just as I was re-adding my directives, I noticed something in the install logs during the upgrade. The upgrade to Nginx had renamed the default.conf file to default.conf.rpmnew . 

Renaming the file back and restarting Nginx (sudo /etc/init.d/nginx restart ) in Fedora/CentOS/Redhat should have you sorted out.

Thursday, December 29, 2011

Grub2: Booting from live ISO or Gparted

Grub2 has gained traction and is now available in most major Linux distributions. At times, in Linux , you require to do some stuff, like for example boot an ISO located in your hard drive - I use Russian Fedora and wanted to see if there was much difference with Linux Mint, and decided to boot from the ISO as my DVD-ROM doesn't work. Of course my laptop is a Compaq.

Other reasons for wanting to boot into an ISO , is when you want to partition your drives, using a tool such as Gparted. Gparted sets up a Grub grub.config for you, however , if you upgraded from Grub to Grub2, Gparted may use Grub config and miss Grub2 which uses the different grub2.cfg.


Luckily, you can edit Grub during boot to boot into whatever your choice is. To boot a Linux Live CD, use these settings (settings can be added to grub2.cfg file or added to grub2 as comp boots, by pressing 'e' , however this is temporary and needs to be done for every reboot:

menuentry "Linux Mint live" {
      set isofile="/path-from-root-to-your-Linux-mint-ISO -file/linuxmint-12-gnome-cd-nocodecs-32bit.iso"
      loopback loop $isofile
      linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet noeject noprompt splash --
      initrd (loop)/casper/initrd.lz
    }

To boot Gparted into RAM(allows you to manage all partitions as none is mounted)  using Grub2 , use:

menuentry "Gparted live" {
      set isofile="/home/projects/Downloads/or-whatever-path-gets-to-your-Gparted-iso/gparted-live-0.11.0-7.iso"
      loopback loop $isofile
      linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia toram=filesystem.squashfs iso-scan/filename=$isofile
      initrd (loop)/live/initrd.img
    }

The above can be modified to boot from a USB. In case you are lost, you can use the ls  command to list what's available to you and the Tab key as a shortcut to complete your directives.

Friday, August 26, 2011

Study identifies Kenya ICT access gaps


Kenya's Ministry of Information & Communication
Permanent Secretary , Bitange Ndemo (with  mic)
, CCK officials and consultants from Aolo Consultoria:
72% of the population lacks access to broadband

The Communications Comission of Kenya (CCK) has released the results of a study on ICT access gaps in Kenya. Commissioned in mid 2009 and carried out by Apoyo Consultoria, the study seeks to provide accurate and reliable data on the availability and accessibility of various information and communication facilities in the country. The launch was held Tuesday at Nairobi’s Ole Sereni hotel and was attended by acting CCK Director General, Francis Wangusi and Permanent Secretary in the Ministry of Information and Communication, Bitange Ndemo.

The study especially tackles the Universal Service Fund (USF)  which was established in the amended Kenya Communication Acts of 2008. The USF is funded from licensee levies , allocation by Parliament , principal and interest payments on advanced loans and investment by funds and endowments. The interest comes from loans of which can be applied form the funds.

Mobile operators however so far posed opposition to the USF saying that it amounted to extra taxation that would logically be passed on to their customers. This lead to a partial compromise where the operators would establish digital villages in an effort to bridge the access gaps.

The report was compiled from data collected in the 2009 national census and information obtained from stakeholders in the ICT sector.”In the past five years, we have carried out studies on the Internet market, the telecommunications network costs , postal and courier market , competition, among others, “ says Wangusi.