Restore GRUB2 MBR with Debian based live ISO

When Debian based live ISO is booted start terminal and type:

mount -t proc proc /mnt/sda5/proc
mount -t sysfs sys /mnt/sda5/sys
mount -o bind /dev /mnt/sda5/dev
chroot /mnt/sda5 /bin/bash

Then run:

update-grub2
grub-install /dev/sda

Server side solution to stop redirect from http to https in Chrome

If you have configured your main web site domain to use SSL for example https://your.domain and https://www.your.domain and you have other sub-domains that you access without SSL you could face an issue where Chrome browser insists to use HTTPS on your sub-domains as well. This can cause problems accessing your sub-domain if it is not using SSL.

Even if you manually type http://subdomain.your.domain it will automatically redirect you to https://subdomain.your.domain Continue reading “Server side solution to stop redirect from http to https in Chrome”

How to fix corrupt packet error for with rsync for large files

In order to have local copies of my web pages hosted on VPS I have configured rsync cronjob to sync everything during the night to my local box.

Sometimes with larger files you can encounter errors like these:

Received disconnect from [YOUR_IP]: 2: Packet corrupt
rsync: [sender] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(820) [sender=3.1.1]

Continue reading “How to fix corrupt packet error for with rsync for large files”