Getting Rid of /.well-known/traffic-advice 404 errors in nginx web server

It seems Google have implemented private prefetch proxy in Chrome for Android.

The upside of this private prefetch proxy is improved browsing experience for mobile users by reducing waiting time for web pages to load.

The downside is, as web server administrators – you might find a lot of 404 status in your web logs.

To solve this, you could either :

  • Write directive to ignore 404 logs for “traffic-advice”
  • Create “/.well-known/traffic-advice file for each domain and set the file to be served with “application/trafficadvice+json” MIME type [source]

Solution

Luckily, TechTitBits have come up with a convenient solution which only involves adding a few lines in configuration files to enable Chrome for Android prefetched proxy in nginx.

location = /.well-known/traffic-advice {
    types { }
    default_type "application/trafficadvice+json; charset=utf-8";
    return 200 '[{ "user_agent": "prefetch-proxy", "fraction": 1 }]';
}

With this solution, you would only need to add the location block within the server { } context in the site configurations.

Thank you for the tip: Traffic Advice configuration for Nginx

Automatically generate gallery with llgal

LLGAL (llgal) is an tool which can automatically generate gallery on your website. llgal is handy if you want to generate photo album out of photos organized in directories/folders.

Running llgal from the console is easy as typing the llgal command at the root directory of your photos.

llgal --exif --li -L -R --title "Album Name" --sx 960 --sy 720 --tx 250 --ty 150

In Ubuntu, the gallery’s theme is located in “/usr/share/llgal/” directory and my customized theme which supports mobile phone can be downloaded here: llgal.zip (mobile enabled)

llgal Screenshot

Personally, i use llgal to generate cctv tiles automatically on my Ubuntu server from which my TP-LINK NC450 and NC250 IP camera uploads through its FTP functions when it detects movements/motion.

 

Installation

llgal can be installed on Ubuntu by running this command

apt -y install llgal

Alternatively you can compile and install llgal directly from its repository
https://github.com/bgoglin/llgal

LILO Linux Bootloader project is ending

LILO – the venerable Linux Bootloader is ending its development. The news has been announced at its project’s page.

lilo-bootloader

I’ve used LILO since the very first time I’m acquainted with GNU/Linux operating system, back in 2002. LILO simplicity makes it easy to install and reinstall the bootloader using standard computer BIOS at the time.

However, guess time has changed, with multitude of the server environment which linux computer may have been deployed, LILO probably has caught up with its limitation.

Still, I could still see LILO can be useful within embedded computing environment.

Canonical reduces support length for Non-LTS Ubuntu releases

Canonical has decided on reduces the official support for non-LTS Ubuntu releases to NINE(9) months starting with the upcoming Ubuntu 13.04 release

As for my personal opinion, this changes is long overdue since 18 month support time for a SIX(6)-month cycle release can be considered as long, thus it is better to invest those precious time and effort into producing newer Ubuntu release.

These changes has been voted with presence of Ubuntu Technical Board and will be effective starting with Ubuntu 13.04 Raring Ringtail onwards.

Ubuntu 12.10 Performance Comparison : 64-bit vs 32-bit

It has been known that the X86 64bit architecture outperform 32bit architecture. However, little is known whether 64-bit Ubuntu installation outperforms its 32-bit counterpart significantly as the latter is marked as recommended download from Ubuntu website.

Luckily [Phoronix] had answered these questions for us. In its latest article, [Phoronix] compares the performance between 64-bit Ubuntu installation and 32-bit Ubuntu installation on a Intel Core i5 2520 (4 cores) with 4GB RAM.

Audio File Encoding Performance (less is better)

Server Workload Performance (more is better)

The result concludes that Ubuntu 12.10 64-bit performs better on overall compared to 32-bit, especially on video/audio encoding/decoding tasks. Ubuntu 12.10 also performs better with server workloads.

My thoughts:
Although Canonical still marks Ubuntu 12.10 32-bit as the recommended download. It seems that 64-bit installation offers greater performance even without the advantage of having greater memory. Some might argue that PAE still allows 32-bit Ubuntu to access more than 4GB RAM, PAE access on 32-bit is still significantly slower when compared to 64-bit memory access. Personally, I use Ubuntu 64bit for my development machine as all of my hardware has opensource drivers.