Nginx behind HAProxy

HAProxy and Nginx on same host are all fun and games. The first one listens on port 443, and the second one on 444, configured as proxy’s backend. Everything works, we go home, right? wrong If you happen to run nginx on a different port on a same host, the folder redirects won’t work properly, as nginx will HTTP/301 the living hell to the proper fully-fledged absolute-path URI, and not relative path. (i.e. https://example.com/folder goes to HTTP/301 https://example.com/folder/ and not HTTP/301 ./folder/). ...

2024-09-20 · 1 min · EK

Debian APT keys: Keyrings and other stuff

Debian APT key management A short story in 4 steps: motivation: apt-key is/is being deprecated. question: How to install keys for other repos - for example, mkusb being the case, but incl. other Ubuntu PPAs - in a organized, manageable and easy-to-reverse manner? solution: StackOverflow example: export GNUPGHOME="$(mktemp -d)" gpg --recv-keys --keyserver keyserver.ubuntu.com 54B8C8AC gpg --export 54B8C8AC | sudo tee /etc/apt/trusted.gpg.d/mkusb-archive-keyring.gpg cat <<-SOURCE | sudo tee /etc/apt/sources.list.d/mkusb.list deb [signed-by=/etc/apt/trusted.gpg.d/mkusb-archive-keyring.gpg] http://ppa.launchpad.net/mkusb/ppa/ubuntu focal main SOURCE downsides: MySQL can, and will overwrite your apt list file. ...

2022-03-09 · 1 min · EK

Fenix E03R

Fenix E03R. Mala lučka, ki se najbolje počuti v neuporabnem žepu vaših kavbojk oz hlač, ki imitirajo slednje z dizajniranjem žepa v žepu. Fizikalije: 47mm x 24mm x 12mm (DŠV) Masa 22g, baterija vključena Ostale specifikacije: Vgrajena LiPo baterija (200mAh), USB-C napajanje (ampak pozor, brez USB-C kabla) Izhodne moči Eco (5lm), Low (30lm), Med (80lm), High (260lm) Skupni čas delovanja 18h, 3h, 1.25h, 0.75h, isto zaporedje “najdlje nese” 7m, 16m, 25m, 42m intenziteta 13cd, 64cd, 156cd, 441cd (za vse ki merite moč v Candelah) Dodatna rdeča LEDika, 4lm izhodne moči z dvema načinoma (konstantno (5.5h) ali utripajoče) Impact resistance: 1m Vodoodpornost: IP66 - moja se je oprala, vsekakor pa to ne svetujem, da počnete. Sprva je preživela. Logika uporabe: ...

2020-08-17 · 3 min · EK

Arch instalation, the Every Possibile Way (TM) (MBR-BIOS / GPT-EFI)

Took me a while, but I made it, once. Took few hours to test and reinstall a few times, just to be sure that it - in fact - really works. Common loadkeys slovene # EFI check: if OK (list exists), boot == EFI. ls /sys/firmware/efi/efivars dhcpcd ip addr list timedatectl set-ntp true MBR, BIOS cfdisk # MBR # /dev/vda1: 9G - type Linux, BOOTABLE # /dev/vda2: 1023M - type Linux Swap mkfs.ext4 /dev/vda1 mkswap /dev/vda2 swapon /dev/vda2 mount /dev/vda1 /mnt EFI, GPT cfdisk # GPT # /dev/vda1: 512M - type EFI System # /dev/vda2: 8G - type Linux Root (X86-64) # /dev/vda2: 1.5G - type Linux Swap mkfs.ext4 /dev/vda2 mkswap /dev/vda3 swapon /dev/vda3 mount /dev/vda2 /mnt Common pacman -Sy pacman -S archlinux-keyring pacstrap /mnt base linux linux-firmware genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt pacman -S vim curl htop wget tmux dhcpcd grub lolcat cowsay neofetch zsh zsh-completions ln -sf /usr/share/zoneinfo/Europe/Ljubljana /etc/localtime hwclock --systohc sed -i '/^#sl_SI.UTF-8/s/^#//' /etc/locale.gen sed -i '/^#en_US.UTF-8/s/^#//' /etc/locale.gen locale-gen vim /etc/locale.conf LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LANGUAGE=en_US.UTF-8 :wq echo "KEYMAP=slovene" > /etc/vconsole.conf echo "cassandra" > /etc/hostname vim /etc/hosts 127.0.0.1 localhost ::1 localhost 127.0.1.1 cassandra.localdomain cassandra :wq systemctl enable dhcpcd MBR grub-install /dev/vda grub-mkconfig -o /boot/grub/grub.cfg EFI pacman -Sy efibootmgr grub-install --target=x86_64-efi --efi-directory /efi/ --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg Common passwd useradd -m user -s /usr/bin/zsh passwd user exit umount -R /mnt reboot All credits due: the Arch Wiki Allmighty(TM) ...

2020-06-13 · 2 min · EK

Pulseaudio: Bluetooth Streaming

I found a post that u/tausciam wrote on r/linux: Pulseaudio can turn your computer into bluetooth speakers for your phone O yeah, I want bluetooth speakers with some sound quality! Quick re-post: edit file (append/vim/*) echo "load-module module-bluetooth-policy" >> /etc/pulse/system.pa echo "load-module module-bluetooth-discover" >> /etc/pulse/system.pa (re)pair phone to a computer done Cheers

2020-04-14 · 1 min · EK