July 14, 2017

Clear DNS cache in Chrome and Windows


Chrome

In Chrome URL field, type in:
chrome://net-internals/#dns

And click on <Clear host cache> button.

Windows

Open CMD with Admin privilege and type in:

ipcnofig /flushdns

March 12, 2017

SSL for Raspberry Pi Nginx server with dynamic IP and Custom Domain

This posting is about how to host your own Raspberry Pi web server at home with dynamic IP with custom domain and SSL.

I tried many different methods and different ways to install certbot, but on RPi Raspbian Jessie Lite, this is the only way.

Goal

Host own web site(s) on Raspberry pi, with custom domain from home, and support SSL.

Environment

  • Raspberry pi + Raspbian Jessie Lite
  • Fast internet
  • Your ISP allows port 80 and 443
  • Own domain and you can edit DNS

Prep-work

  1. Set up Raspberry pi with static IP, and configure your router to port forward to your RPi web server, port 80 and 443(SSL) 
  2. Set up custom domain with dynamic IP.  Make sure you have correct settings in DNS set up.
  3. Set up Nginx on RPi

Set up SSL on RPi  

  • You have to do above prep-work before follow below steps.
  • It is assumed your web site's root doc directory is: /var/www/mysite/
  • It is assumed your custom domain is: www.mydomain.com
  • Nginx is up and running, and accessible by the custom domain.

STEPS:

March 11, 2017

Custom domain and dynamic IP

Goal

Make home Raspberry Pi server accessible from outside with custom domain.

Environment

  • Raspberry Pi with Raspbian Jessie Lite
  • High speed internet at home (e.g. Fios), dynamic IP
  • Appropriate ports are open: 80, 443, 23, etc.
  • Own domain and access to DNS setting


Steps

March 10, 2017

Raspberry Pi mount exFAT Flash Drive as storage

Goal

Mount USB flash drive to RPi.

I can use large SD card, but:
(1) I already have a small SD card I want to re-use, and want to separate OS and data.
(2) I want to back up/store from Windows for data files.
(3) large capacity flash drive is cheap.

Environment

  • Windows 10 64bit
  • RPi, Raspbian Jessie Lite

March 8, 2017

Post Raspberry Pi status on Twitter

Goal

Tweet RPi (and CHIP) status with temperature, external IP, etc.

Environment

  • Raspbian Jessie Lite
  • Python 2.7

Prepare Twitter Account

A Twitter account is needed to publish the status, and set it to private unless you want to make postings public.
  1. Register Twitter account
  2. Log on to Twitter with the account.
  3. Go to https://twitter.com/settings/account
  4. Change setting in Privacy and safety, Email notification, 
  5. Go to https://apps.twitter.com/
  6. Create New App and get following:
    • Consumer Key (API key)
    • Consumer Secret (API Secret)
    • Access Token
    • Access Token Secret
From your regular Twitter account, follow above account.