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

Configuration to run OJS 3 smoothly behind nginx reverse proxy

A lot of people struggling in configuring PKP Open Journal System 3 (OJS3) to run behind nginx reverse proxy as OJS3 does not support nginx natively

So most implementation would settle with Apache HTTPD server or install it behind nginx reverse proxy.

However the problem is that the OJS3 behave badly when placed behind nginx reverse proxy, especially when the reverse proxy is using HTTPS / TLS. This messed up the based URL in the OJS3, subsequently causing some resources from the website to be unavailable.

To solve this, you only need to add a single line in the Apache HTTPD site configuration file.

        SetEnvIf X-Forwarded-Proto "https" HTTPS=on

A full blown example is included via gist

Morality and Legality of Open Source Code Forking

Free Software (or Open Source Software) aims not only to give the freedom to use software without restrictions, but also grants the user the freedom to modify, enhance and redistribute the modified code to others while simultaneously granting others the same freedom as well.

To this end, commercial companies have benefited from contributions made by online communities from all over the world on Free and Open Source Software, which some of the company gives back.

However there are also some quarters who are not prepared to face the reality of code forking, especially when the fork has the potential to compete with the original software.

Read:

How to save (or mirror) an entire website with httrack in Debian and Ubuntu

Httrack is a tool for copying and saving an entire website in Debian and Ubuntu. Httrack can crawl an online website save each of the pages (including graphic and other downloadable files).

Among httrack features are:

  • Able to continue interrupted downloads
  • Selective download
  • Customizable user-agent
  • Customizable Scan-rules, can exclude files from being crawled
  • Accept cookies
  • URL hacks
  • Tolerant requests support
httrack screenshot

Using ‘httrack‘ is easy, as it has built-in wizard that can guide you through the process of mirroring web sites. The user will be asked a series of question about the URL to be mirrored, the location where the files will be saved, proxy server and the user-agent to be used.

p/s: httrack perhaps is the only open-source website copier/downloader tool available for GNU/Linux operating system. It is efficient and easy to use. The only gripe that I’ve when using ‘httrack‘ is that it does not provide progress feedback (unlike its counterpart in Microsoft Windows) like ‘wget

Public Domain vs Open Source License, which to choose ?

*Note that I’m not a legal expert or an attorney, this is just based on my personal experience and internet search*

There are people who asked me about why bother to release a piece of software or code under Open Source License instead of putting it in Public Domain.

First of all it is a matter of personal choice if write the code or the said work on your own, . But if you release your work under open license (open source or creative commons), you can still retains the copyright (ownership) of the materials that you’ve released. Technically, people who used your work has to adhere to the copyright license terms of your choosing, including freeing you from liabilities if the software is broken or causes harm. Licensing your work will acknowledge you as the owner and those who used your application, and you retain legal rights for your work.

On the other hand — once you have put your work on Public Domain, you will lose your rights on the work, as the work would have no copyright-owner and isn’t protected by copyright law. So people are free to use the materials without any restrictions at all, including to incorporate the material into their work and make it proprietary and subsequently copyrighted it without legal repercussion. You will lose the legal right on your work.

Public domain isn’t a license, it is merely a statement that the software was given to the public and to make things more complicated, some countries disallow public domain material, meaning that the writer will not be protected by the copyright law if the software causes harm to others (the ABSOLUTELY NO WARRANTY and LIMITED WARRANTY, or AS IS clause).

Remember: Public Domain is not recognized internationally and is not stipulated under Berne Convention and in some countries, the author can’t disclaim moral rights.

Therefore, it is more wise to release the the software under a permissive license (copyright), rather than releasing it under public domain right away.

References
1. Creative Commons vs Public Domain
2. Is Public Domain software Open-Source ?
3. Why the Public Domain isn’t a License?
4. Why public domain release is a bad idea

I’m Getting The Art of Community: Building the New Age of Participation Book by Jono Bacon

Art of Community

I’m getting “The Art of Community: Building the New Age of Participation“, a book written by Jono Bacon, Ubuntu Community Manager (UCM).

In this book, Jono offers a collection of experiences and observations from his involvement in building and managing communities, including his current position as Ubuntu Community Manager, arguably the largest community in open source software.

The content of the book, will help you to:

  • Develop a strategy, with specific objectives and goals, for building your community
  • Build simple, non-bureaucratic processes to help your community perform tasks, work together, and share successes
  • Provide tools and infrastructure that let contributors work quickly
  • Create buzz around your community to get more people involved
  • Track the community’s work so it can be optimized and simplified
  • Explore a capable, representative governance strategy for your community
  • Identify and manage conflict, including dealing with divisive personalities

This book is useful to those who are in a position that manages and responsible towards online communities, including day-to-day management, governance, managing conflics and how to promotes the community effectively.

An online preview is this book is available from Amazon Bookstore
“, a book written by Jono Bacon, Ubuntu Community Manager (UCM). website.