Categories
Tech

Guide: HAProxy HTTP Basic Authentication for specific sites (SSL Termination)

Objective I use HAProxy to serve multiple SSL/TLS enabled sites with HAProxy doing SSL termination. The sites serve regular HTTP while users see proper HTTPS sites (with free certificates from LetsEncrypt). My objective was to provide HTTP Basic Authentication as a second layer of protection for certain applications like NextCloud (DropBox clone) or Gitea (GitHub […]

Categories
Linux

How to run Gogs behind HAProxy serving https (SSL/TLS) connections

I run Gogs in a LXD container which runs behind HAProxy in another LXD container. HAProxy handles SSL/TLS connection (SSL Termination). Note: Gogs is a Git service like GitHub or GitLabs. It is written in Go and normally used to host your own git server along with GitHub like interface and functionality (for free). As […]

Categories
Linux

Nginx Server Error – 413 Request Entity Too Large

If you’re getting 413 Request Entity Too Large error trying to upload file to nginx server then you need to increase the size limit in nginx.conf . Add client_max_body_size xxM inside the server section where xx is the size in MB.

Categories
Linux

OVH: How to add Additional IP Addresses (IP Alias) on Ubuntu 16.04 / 18.04

Adding additional IP addresses in OVH is rather unconventional and the guide they point to in their mail is non-existent. The process, fortunately, is simple: ssh to the server as root cd /etc/systemd/network/ vi *-default.network Add the new IP address after the original IPv4 Address DHCP=no Address=Main_IP/24 Address=Failover_IP/32 Save and close the file Reboot the […]

Categories
Tech

How to remove Squeak and Scratch from Raspberry Pi: Raspbian Jessie and Wheezy Distro

Raspbian Jessie and Wheezy distribution includes Squeak and Scratch. While these can be helpful educational tools for students which provides a gentle introduction to programming, it doesn’t have much use for others. The following instructions will remove both Squeak and Scratch from your Raspberry Pi (Raspbian distribution). It saves 92.7 MB and 1.15 MB respectively […]

Categories
Tech

Code: How to reboot TP-Link Router

TP-Link router may need to be occasionally rebooted as it sometimes hangs in my experience. Here is a script I developed long back to boot such errant server from command line: wget -qO- –user=admin –password=admin-password http://192.168.1.1/userRpm/SysRebootRpm.htm?Reboot=Reboot Notes: You will need wget installed on your system. You may need to change the IP Address and Password. […]

Categories
Tech

What I learned and how I recovered from Partition Table corruption due to Power failure and fsck

Had an interesting experience. Our power blinked (rapid off and on) few times. Not only did SuKam UPS pass that through the power fluctuations but continued after power has stabilized. By the time I switched off the computer, the damage was done. It would only boot to Grub prompt. Used a SSD drive from another […]

Categories
Tech

How to auto-update CNote, Simple CLI Note Taking Application, to Google Drive Cloud

Super simple command line note taking tool for tracking breadcrumb trail during application development… CNote is a super-simple command line based Note taking application which we use to track changes, take notes before signing-off etc. during development. It can be used on all variants of Unix, Linux and Mac OS. It’s power lies in quickly […]

Categories
Tech

DropBox client on Raspberry Pi

DropBox installer client can be installed from source on Raspberry Pi. The client expects GUI with nautilus installed which is not available by default on Pi. The installation however succeeds. You will need to install libnautilus-extension-dev and python-docutils: apt-get install libnautilus-extension-dev and python-docutils Then install using: ./configure;make;sudo make install However the whole process is in […]