dimitris kalamaras

mathematics, social network analysis, free software…

Category: Linux (Page 1 of 3)

How to get free signed SSL Certificates and setup secure domains in Apache and Debian

This how-to describes the process to obtain 100% free, signed SSL Certificates from StartSSL.com and configure Apache in Debian to use these SSL certificates in your virtual domains, so that people can access your site(s) through https (i.e. https://example.com) without ever having the browser tell them the scary “this site isn’t trusted” anymore.

Before you start, you will need:

  • One or more of your functional domains which point to a server you own and have root access to. In this tutorial I’ll be using my wife’s supersyntages.gr as testbed.
  • A browser, for this tutorial Chrome, although you might prefer Firefox (see below why).
  • Root access to your server with Debian and Apache installed, with the above domains configured as VirtualHost.
  • The openssl package installed in your computer.
  • One of the following emails configured in each of the domains you want to include in the SSL certificates:
    [email protected]
    [email protected]
    [email protected]

Read More

An apache monitoring script

One of the daily routines administrators do is to monitor their web server logs for various interesting things: response codes (i.e. 500), attempts to access restricted pages, user-agents, ips, popular pages, even image hotlinking from other sites. In Linux servers, this can be easily done through shell one-liners involving various tools (tail, awk, sort, cut etc). Here is a bash script I use which automates apache monitoring for a given website.

Read More

Git: Which hours you commit the most

If you use Git for version controlling some projects of yours and you are a number-crunch fanboy, you might be interested to know which hours you (or some fellows in your team) are active the most. I mean which hours during the day you do your commits. This is onliner will do this for you. Run it from inside your project dir:

Read More

How to setup Maildir style virtual mailboxes in Debian with Postfix

Virtual mailboxes is a clear choice if you want to setup your mail server with multiple domains and non-Linux accounts. Of course, there are other and easier ways to setup Postfix for hosting multiple domains.

The most simple is to host additional (shared) domains by adding them to the ‘mydestination’ variable in postfix’s main.cf. But that solution lacks distinction between canonical and hosted domains ([email protected] is delivered to the same unix account as [email protected]).

A better approach is through “virtual aliases”, which allow separate domains and email addresses. For that, you only need to configure two parameters: ‘virtual_alias_domains = domain1.com domain2.com’ and ‘virtual_alias_maps = hash:/etc/postfix/virtual’. You declare the list of your hosted domains in the first and alias each one to a local linux account with the second (i.e. in /etc/postfix/virtual add “[email protected] root” to have mails sent to domain1.com’s postmaster delivered to root). However, this is not an optimal solution if you plan to host more and more domains or if you just don’t want to give shell access to your server.

The really best solution is to use the Postfix virtual mailbox delivery agent. With this approach, every email address has its own virtual mailbox and you need to setup only one system account (to be the owner of all mailboxes). And each domain’s mailboxes are properly arranged in the file system under the home dir of the owner account:

VhostsDomains

In this how-to, I describe the process that I followed to setup virtual mailboxes in my postfix server for a pet project of mine.

Read More

Varnish Cache How-To: Intro to High-Availability for Drupal lovers (and WordPress addicts)

Varnish (openclipart)

What is Varnish?

Varnish Cache or just Varnish is an open-source HTTP accelerator and caching reverse proxy for web servers, like Apache or nginx, hosting content-heavy dynamic web sites.  In non-geek speak, Varnish is an free program which runs in front of your web server (which in this context is called backend or origin) and stores (caches) a copy of each webpage served by the web server.  When a user requests a cached page, Varnish steps in and serves the cached copy instead of requesting the same page again and again from the backend server. So Varnish is ideal for developers who run high traffic sites with lots of visitors and like their web application to be highly available and running fast. This how-to is an attempt to present a comprehensive but simple introductory guide to Varnish configuration for web developers who want to scale their projects gracefully.

Read More

coppa.gr – Οι αθλητικές ειδήσεις σε απευθείας μετάδοση

Τι συμβαίνει όταν η linuxάδικη ομάδα ενός επιτυχημένου ειδησεογραφικού site συνεργάζεται με γνωστούς και πετυχημένους αθλητικούς δημοσιογράφους; Μπορεί να γεννηθεί ένα νέο, μοντέρνο και ανεξάρτητο αθλητικό site: το coppa.gr.

Στημένο σε Drupal, το coppa.gr είναι “100% powered by Linux” και ανοικτό κώδικα: από τα desktops των συντακτών που τρέχουν Kubuntu και το pfSense firewall μέχρι τον Debian server με Apache, MySQL κλπ. Εντυπωσιακό, νομίζω, γρήγορο και καλαίσθητο, το COPPA φιλοδοξεί να μεταδίδει καθημερινά, έγκαιρα και έγκυρα, αθλητικα νέα από όλα τα σπορ, χωρίς κασκόλ και εξαρτήσεις. Άλλωστε, το περιεχόμενο «υπογράφουν» άνθρωποι που γνωρίζουν το αντικείμενο καλύτερα από τον καθένα: Σωτηρακόπουλος, Σπυρόπουλος, Βέργης, Θειακός, Σωτηρίου, Χριστοφοράκης, Λοθάνο, Τσούτσος, Θαναηλάκης κα.

Τεχνικά, η υλοποίηση έγινε με D7, Zen, megamenu, views, rules, media, ckeditor και τα υπόλοιπα γνωστά modules της κοινότητας του Drupal, την οποία χιλιοευχαριστούμε.

Χαρείτε το!

coppa.gr

Στιγμιότυπο από το coppa.gr

top: Πόση μνήμη καταναλώνει κάθε process στο Linux

Θέλετε να δείτε που καταναλώνεται η μνήμη RAM του υπολογιστή σας και ποια διεργασία ή εφαρμογή σας τρώει συστηματικά τους πόρους; Υπάρχουν διάφορες λύσεις είτε από το γραφικό περιβάλλον είτε από τη γραμμή εντολών (bash) αλλά δεν συγκρίνονται μπροστά στο πανταχού παρών top.

Το table oprocesses είναι πολύ περισσότερα από ένας απλός πίνακας των προγραμμάτων που τρέχουμε. Ανανεώνεται συνεχώς και μας δείχνει uptime, κατανάλωση μνήμης, cpu load, αριθμό διεργασιών, κατανάλωση swap και αναλυτική περιγραφή κάθε διεργασίας που τρέχουμε (μνήμη, %cpu, share, niceness, user, pid, πόση ώρα τρέχει και ποια εντολή είναι!). Και όλα αυτά sortable. Για παράδειγμα για να σορτάρετε τις διεργασίες που σας δείχνει ώστε να εμφανίζονται ανάλογα με την κατανάλωση μνήμης πατάτε το πλήκτρο Μ.

To top εν δράσει!

Read More

Page 1 of 3

Creative Commons License
Licensed under a Creative Commons Attribution-ShareAlike 4.0 International License - Powered by Linux