Categories
Hardware Linux

Fix: Laptop Touchpad disabled after Ubuntu 18.04 Update

I upgraded to Ubuntu 18.04 without issues. However, after a certain update suddenly the laptop touchpad stopped working. I tried few fixes suggested and ended up disabling even the keyboard. I didn’t have time to debug and left it as it is for few days. Today, finally I looked into it and found a simple […]

Categories
Linux

Production: How to check and fix nginx errors before deployment

I will show a simple tip to test nginx configuration on live site ( production server ) before deployment. This is especially useful for server serving many different sites. A little mis-configuration, even a missed comma, can instantly bring down hundreds or even thousands of sites. So you should test it first: If it fails […]

Categories
Linux Tech

Static Page Sites: How to clean URL structure on Nginx

Static Sites are all the rage these days because they are: super-fast (static pages which can also be cached in memory for further speed) impossible to hack (how can you hack non-executable html pages?) very low load on the server (minimal processing) However, you will often find broken links due to minor changes in the […]

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

How to provide Secure Isolated (Restricted) SFTP Access for file transfer

Often we need to provide secure but restricted sftp access to our clients to upload or download large files. Regular sftp accounts allow the users to view login names of other users/clients and in many default installations even allow them to browse through the directories and files. In addition, they can also view your system […]

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

How to list all URL's in Redirect chain

This simple utility is extremely useful in detecting bad redirects and loops, specially in big websites. You can also include it in scripts. wget http://gmail.com 2>&1 | grep Location: The response, in this case, is: Location: https://www.google.com/gmail/ [following] Location: https://mail.google.com/mail/ [following] Location: https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1# [following]

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
Linux Tutorials

LXD: How to easily apt update and upgrade all running LXD containers

It is easy to create large number of LXD / LXC containers as it consumes minimal resources. Coupled with btrfs, it consumes minimal hard-disk space also due to de-duplication built-in within btrfs file system. Soon you would find yourself spending a significant amount of time updating (sudo apt update) and upgrading (sudo apt -y upgrade) […]