Handle multiple virtual domains on one debian host | nginx + certbot/letsencrypt

For every domain create a nginx file, put it into /etc/nginx/sites-available and symlinklink it into /etc/nginx/sites/enabled: /etc/nginx/sites-available/my-domain.tld server { listen 80; listen [::]:80; server_name my-domain.tld http://www.my-domain.tld; root /var/www/my-domain.tld; index index.html index.htm; location / { try_files $uri $uri/ =404; } } Create the corresponding dirs and index.htmls (here: /var/www/my-domain.tld) Restart your nginx: Run your certbot That […]

BASH | Shalla | Squid acl import error | blacklist import // deduplicate shalla blacklists

# SLOW function dedup () { declare -a A_IN=(“${!1}”) declare -a A_OUT=(“${!1}”) for A_IN_ELEM in “${A_IN[@]}”; do II=-1 for A_OUT_ELEM in “${A_OUT[@]}”; do II=$(( $II + 1 )) [[ “x$A_OUT_ELEM” == “x$A_IN_ELEM” ]] && continue [[ “x$A_OUT_ELEM” == “x” ]] && continue echo “$A_OUT_ELEM” | grep -w “$A_IN_ELEM” > /dev/null if [ $? -eq 0 […]