Skip to main content


apache proxy authentication

I mostly have a web hosting configuration where there is a frontal reverse proxy, and one or more backend Docker or LXC container. I need to perform "Basic Authentication" at the Reverse Proxy level. <VirtualHost *:443> ServerName <Proxy *> Require all granted </Proxy> ProxyPass / ProxyPassReverse /   ProxyPreserveHost On ProxyRequests On <Location /> AuthType Basic AuthName "Ask to Mihamina" # (Following line optional) AuthBasicProvider file AuthUserFile "/etc/httpd/conf/extra/users" Require user freerace </Location> </VirtualHost>
Recent posts

BASH POST ElasticSearch

Looking for a way to log messages to an Elasticsearch instance, I searched and found that this would be my preferred one. Prerequisites are to have jq and curl installed. Write a function elk_log(): elk_log(){ # Default configuration ELK_HOST="" ELK_PORT=9200 ELK_IDX="mihamina-database" # Overridden if ENV vars set: if [ -n "$GW_HOST" ]; then ELK_HOST=$GW_HOST; fi if [ -n "$GW_PORT" ]; then ELK_PORT=$GW_PORT; fi TSTAMP=$( date --iso-8601=sec ) curl -H "Content-Type:application/json" \ -X POST --silent \ --data "$( jq -n \ --arg tstamp "$TSTAMP" \ --arg message "$1" \ '{timestamp: $tstamp, message: $message}' )" http://${ELK_HOST}:${ELK_PORT}/${ELK_IDX}/_doc } Then call this with: #[...] elk_log "MIHAMINA DATA STRUCTURE BEGIN" #[...] elk_log "MIHAMINA DATA STRUCTURE END" #[...] Tha

VMWare Workstation Tunning

This is what setting I currently use to get most performance on my Workstation. Workstation Pro Version 16.1.1, Linux 5.11.11 host (Archlinux) mainmem.backing = "unnamed" sched.mem.pshare.enable = "FALSE" mainMem.useNamedFile = "FALSE" prefvmx.minVmMemPct = "100" prefvmx.useRecommendedLockedMemSize = "TRUE" mainMem.partialLazySave = "FALSE" mainMem.partialLazyRestore = "FALSE" priority.grabbed = "high" priority.ungrabbed = "normal"

Archlinux PHP7 Symfony Docker

When I need to setup a PHP7 Symfony Docker container based on ArchLinux, I use this: But these are some additional key points: RUN echo 'Server =$repo/os/$arch ' > /etc/pacman.d/mirrorlist RUN echo 'Server =$repo/os/$arch ' >> /etc/pacman.d/mirrorlist RUN echo 'Server =$repo/os/$arch ' >> /etc/pacman.d/mirrorlist RUN echo 'Server =$repo/os/$arch ' >> /etc/pacman.d/mirrorlist RUN echo 'Server =$repo/os/$arch ' >> /etc/pacman.d/mirrorlist RUN echo 'Server =$repo/os/$arch ' >> /etc/pacman.d/mirrorlist RUN echo 'Server =$repo/os/$arch ' >> /

SSH Host Completion

Starting from I dont know what version of what, SSH ".known_hosts" has hashed hosts, so that I cannot complete SSH hosts to connect to! In order to get it back, I had to erase the ".known_hosts" and set SSH up not to hash known hosts: # ... Host * HashKnownHosts no Compression yes LogLevel debug #...


 I use Emacs as PHP IDE in some projects. Let's get to the point:  (require 'package) ;(setq package-check-signature nil) (add-to-list 'package-archives '("gnu" . "") t) (add-to-list 'package-archives '("melpa" . "") t) (add-to-list 'package-archives '("melpa-stable" . "") t) (package-initialize) ;; We will use 'use-package' to install and configure packages. (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (eval-when-compile (require 'use-package)) (add-to-list 'exec-path "/home/mihamina/Apps/node/bin") (add-to-list 'exec-path "/home/mihamina/node_modules/.bin") (setq inhibit-startup-message t) (setq inhibit-startup-screen t) (use-package php-mode :ensure t :mod

Archlinux package SQLite

I want to store my installed packages to SQLite This is mostly useless for most of people on the world, and this blog post is more a note to myself. sqlite> CREATE TABLE packages (id INTEGER PRIMARY KEY, package TEXT); sqlite> INSERT INTO packages (package) VALUES ('test'); sqlite> INSERT INTO packages (package) VALUES ('test'); sqlite> SELECT * FROM packages ; 1|test 2|test Well, I solved the "SQLIte Auto increment" question! pacman -Q \ | awk '{print "INSERT INTO packages (package) VALUES (\x27"$1"\x27);"; }' \ | sqlite3 packages.sqlite