I recently started a new job as a sysadmin and technical support specialist. To streamline repetitive tasks, I created handy functions to quickly answer my needs.

For example, to check the information of a domain name, I would simply use the command: g example.com


This script provides:

  • Current DNS record (if not locally propagated) and expected DNS record after propagation.
  • Nameservers for the domain.
  • Key WHOIS information, including expiration date, creation date, last update, status, and registrar details.
# Getting selective informations about a domain
function g() {
  echo "############ nslookup ###############"
  nslookup $1
  echo "############ nameservers ###############"
  dig $1 A +short @8.8.8.8
  dig $1 NS +short @8.8.8.8
  echo "############ WHOIS ###############"
  whois $1 | grep -- 'Expiry\|Creation\|Updated\|Status\|Registrar:'
}

You may add this code to your .bashrc or elsewhere.

About

This basic scripts helps automating the creation of domains or subdomains.

Usage: Create a vhost

chmod +x setvhost.sh

Set the domain or subdomain

setvhost.sh —d subdomain3.example.com —u /var/www/mydir/public

or

setvhost.sh --domain subdomain3.example.com --directory /var/www/mydir/public

SSL for subdomains case

I usually use it with subdomains to which I add a wildcard certificate, which you can generate using acme.sh or certbot:

certbot certonly --manual --preferred-challenges=dns --email mail@example.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d example.com -d *.example.com

You will have to add the returned DNS record for verification.

The returned cert has to be added to the SSL part of the skeleton file ‘vhost.skeleton.conf’:

SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem

Addon domains case

In this cas you will have to add to the end of the script an SSL request. For example, when used with certbot: certbot certonly –preferred-challenges http -d example.com

Cetbot instructions: https://certbot.eff.org/

Continue reading

About

This is a basic script that allows you to add aliases to an Apache config in which HTTP & HTTPs virtualhosts have already been set. I wrote the script to automate SAAS  processing. You can, however, customize it the way you wish.

Usage

Specify in setalias.sh the main vh that will be used as reference:

vh=”/etc/apache2/sites-available/saas.example.com.conf” main=”saas.example.com”

Then run your command:

setalias.sh add saas2.example.com

or

setalias.sh remove saas2.example.com

Continue reading

إذا كنت من مستخدمي منصات التواصل الاجتماعي كفايسبوك، فتأكد من تحليل الخلل من خلال Debug tool وهو ما يسمح أيضا بتحديث ذاكرة الصور المحفوظة في حال أردتم تجديدها. وعلى كل، فبعض الأخطاء تكمن في كتابة توصيفات Open Graph في الصفحة، وبعضها الآخر يتمثل في عوائق الوصول إلى الملفات أو في عوائق قراءة الصفحة (parsing) وقراءة توصيفات OG.

Continue reading

If you are developing your app on Microsoft Windows and you are planning to run it on Linux, you will have to seriously pay attention to the letter casing of your inputs. This includes commands, filenames, but also database and table names since table names in MySQL are file system entries, so they are case-sensitive if their operating system is so.

Example of filenames on Linux

Example of filenames on Linux

Continue reading

النسخة الحالية لسكريبت Kleeja نأخذ بعين الاعتبار البروتكول المستعمل أثناء التثبيت، ما يعني أنه إن تم تثبيت السكريب بالسابقة HTTP، فإنه ينشئ معرّف الموقع في قاعدة البيانات على ذلك النحو وللتعديل، وللانتقال إلى HTTPS ينبغي تعديل بروتكول خانة siteurl إلى https في طاولة config من قاعدة البيانات.

بحيث يعاد كتابة الرابط من http://example.com إلى https://example.com

وكذلك في الملف المولّد cache/data_config.php

ضمن الوضع المتأزم الذي تمر به ولاية البليدة ومناطق مختلفة من القطر الجزائرية إلى جانب ضبابية مآلات الأمور في الفترة القادمة، نود أن نقترح على الهيئات المسؤولة والأمنية التحضير لفكرة إنشاء تطبيق لتقديم التصاريح بالخروج من الحجر المنزلي.

Continue reading

تعد مؤسسة ديزاد سيكيورتي DZSecurity إحدى أبرز وأهم مؤسسات الاستضافة وأمن البيانات في الجزائر. وتتصدر منذ أزيد من عقد خدمات الاستضافة بل وعددا من أكثر المواقع الجزائرية زيارة على قائمة Alexa. وهذا يرجع لخبرة مختصّيها واستقرار أنظمتها ومواكبتها لآخر التطورات التقنية مع تنوع استراتجياتها.

 

Continue reading