-
Get number of files or directory using tree
Tree is an useful linux command to display a tree representation a full directory structure or a part of it. On a Debian based distro like Ubuntu install: The last line of tree print a line like this: 346 directories, 174 files If you’re changing files and directories and you want a real-time update of […]
-
Nginx configuration for Django
Django is a powerful framework for building websites. To run a production website, usually an application server is used. So nginx will do two basic things: Serve your Django application from the application server port to the web port (Reverse Proxy) Serve static and media files The application server used in this example is gunicorn, […]
-
nginx: [emerg] open() “/usr/share/nginx/off” failed (13: Permission denied) [SOLVED]
After a failed restart of the nginx server, you can get this error typing journalctl -xe: nginx: [emerg] open() “/usr/share/nginx/off” failed (13: Permission denied) [SOLVED] This is caused by a misconfiguration of nginx.conf or a conf inside the /etc/nginx/conf.d/ directory where there’s something like: This is the wrong way to disable logs. Nginx is actually […]
-
Use external mail server for mdadm
mdadm is the utility to check and report failures on RAID disks. The usual way this Linux application send its message is a plain old e-mail. In this howto you’ll find the instruction to use an external mail server with mdadm. First, replace sendmail with an external email account. After you’ve configured and tested msmtp […]
-
Use external SMTP server for system mails on Linux
To use an external SMTP for all system e-mails, you have to install these: Where msmtp-mta transform the external reference in the sendmail command usable by any application using sendmail. In this way you haven’t to install and configure Postfix since you’ll rely on an external SMTP service. Create the config file for msmtp This […]