Ihr Partner in Web-Entwicklung

Innovative Ideen für Ihr Unternehmen

Web-Entwicklung

Egal ob neue Firmen-Webseite, CRM-System oder Spezial-Software. Wir sind ihr Ansprechpartner in Sachen Web-Entwicklung!

Wir erstellen Webseiten und Web-Applikationen nach ihren Wünschen und Anforderungen. Dabei setzen wir stehts auf die neusten Technologie- und Sicherheits-Standards.

Netzwerk Administration

Planung, Aufbau und Administration ihres kleinen bis mittelständigen Firmen-Netzwerkes.

Wir kümmern uns daraum dass es in ihrer Firma läuft. Wir planen, bauen und administrieren ihr Unternehmens-Netzwerk.

Linux Server Management

Aufbau, Instandhaltung und Wartung ihres Linux-Servers.

Wir bieten ihnen einen umfassenden Service für ihren Linux-Server. Wir sorgen dafür, dass alles auf dem neusten Stand ist und ihre Services verlässlich laufen. Dabei achten wir stehts auf die Sicherheit ihres Netzwerkes und ihrer Kunden.

Wer Sind Wir?

Software ist Analyse und Instrospektion. Um einen Prozess zu verstehen, betrachten wir ihn so lange bis wir ihn verstehen. Gute Software erklärt einen Prozess in einfachen Schritten.

Wir bauen Software aus Micro-Services, kleine Komponenten die eine kleine Aufgabe erledigen. Ein Service alleine ist nahezu nutzlos, aber wenn mehrere zusammenfließen - dann können sie komplexe Prozesse abbilden und verwalten.

Viele unserer Services sind Open-Source, so das sie von der Community geprüft und verbessert werden können. Das erlaubt uns transparente und effiziente Arbeit.

Wir ergänzen diese Services dann mit anderen Services die proprietär sind, und das geistige Eigentum ihrer Firma schützen. [Mehr erfahren?]

Wir möchten das unsere Kunden das Gefühl haben das dass was wir tun ganz einfach ist. Dann wissen wir das wir es richtig machen.

César

César

Inhaber & Entwickler

Sebastian

Sebastian

Entwicker

BLOG

Wir nutzen unseren Blog um uns mit anderen Entwicklern auszutauschen. Die Softwareentwickler Community ist global, und selten Deutsch sprechend. Unsere Artikel sind deshalb alle auf Englisch verfasst. Wir laden sie trotzdem ein sich umzuschauen.

chroot Jails are actually surprisingly simple

14/02/2020

This week I had a client come to me and ask whether I could set up ‘an FTP account for a third party provider’. They have a piece of really old legacy Software and wanted this person to look into it.

After looking around a little, I found that you can actually really easily create chroot jails for SFTP users specifically.

I immediately felt better about it, because setting up unsecured and unencrypted FTP servers kinda freaks me out in 2020.

In our case, we don’t need the user to actually have shell access. So I set up a user with a command like this:

# useradd -gsftp -d / -s /sbin/nologin sftpguest
# mkdir -p /sftp/sftpguest/uploads
# chown sftpguest: /sftp/sftpguest/uploads

Then we just add these three lines to our /etc/ssh/sshd_config file:

Match Group sftpusers
        ChrootDirectory /sftp/%u
        ForceCommand internal-sftp

After reloading the ssh service, you should be good to go.

Adding external directories to your jail

In our case, we wanted our user to be able to inspect and suggest changes to a folder withing /var/www to do so we just mounted the directory like this

# mkdir /sftp/sftpguest/project
# mount --bind /var/www/old-website /sftp/sftpguest/project

And we’re ready to go. You may need to remember to give the user permissions to read and or write to the /var/www/oldwebsite folder

Sources:


: 0 : linux, sysops

Dealing with older PHP versions

07/02/2020

This week I came to the point where I installed an older PHP project to a new server running on PHP 7.4. Unfortunately my script threw some errors because of deprecated functions in this version of PHP. But I need those functions in older PHP versions. So I used a small but handy builtin function called version_compare(). This function allows you to compare the current PHP version with a specified one. With that you can run code only for specified PHP versions.

Example: Run code when the PHP version is below 7.4.0

if (version_compare(phpversion(), '7.4.0', '<')) {
    // run the deprecated functions
}

: 0 : linux, syso

Apache MPM Prefork as a bottle neck

31/01/2020

I had always been told that Apache is a slow web server, and I never understood why people would say that. All my applications are incredibly fast when hosted on an Apache server and have always been.

Until recently. Over the last weeks I’ve noticed that one of our servers was becoming super unresponsive.

I first went and checked if everything else I knew that could be a bottleneck for the machine actually was being one. There were no obvious IO issues, network was fine, and the CPU was almost idle. But the web server was taking several seconds to respond to a single request.

Then I started to blame let’s encrypt for the issue. Because the browser was reporting that it was taking the web-server several seconds to negotiate a TLS handshake. A few searches later I was coming up empty handed.

Apache is notoriously hard to debug. If the server becomes unresponsive, the only hope you have is mod_status which will render a HTML page with information on why exactly your web server is not responding.

In my case I found the culprit after a few minutes of looking at the status page. I had a solid block full of 128 ks right on the status page.

The K stands for keepalive and basically tells you that the web server is waiting for the client to decide whether they wish to reuse the connection. The process is effectively blocked while doing this.

So, in the end I found out that my webserver is running 128 processes that are all waiting for the connection to be reused, and after a few seconds (keepalive TTLs aren’t that high) it would start to accept the next one.

I’ll be switching the server over to mpm_event in hopes that it will provide better performance.


: 0 : linux, sysoapache, engineering, httpd

Postal is awesome for incoming emails. Wildcards!

24/01/2020

I’m always surprised when I find little attention to detail inside of Postal. It supports wildcards and even partial wildcards.

This ticket on the Postal issues implies that routes like notifications-*@domain are not possible. But that’s actually not entirely true.

You can create a route called [email protected] and then send emails using [email protected]. The plus symbol is generally regarded as a way to route email wihin an inbox (this GMail post explains how it works) an postal supports this.

This makes it super easy to route stuff when it arrives into postal, and the application can then associate the part with the appropriate notification / thread / post / account by parsing the fragment.

I love finding out stuff like this when working with Postal.


: 0 : linux, sysoapache, engineering, httpdengineering, postal, email

Autoload your Classes

17/01/2020

This week I came to the point where I needed to load a bunch of classes, to get my project (a small self made PHP framework) to run. Luckily PHP has some builtin functions to to this.

The __autoload() function, which has been deprecated as of PHP 7.2.0. And the the newer spl_autoload_register() function. Which you should use now days.

A short example, using an anonymous function.

spl_autoload_register(function ($class) {
    include 'classes/' . $class . '.class.php';
});

This short function allows your script to load missing classes. Every time when you call a class which has not been loaded first, this function will be executed and loads the required class. This is very useful when you have a lot of classes and don’t want to load each class on every page-load.


: 0 : linux, sysoapache, engineering, httpdengineering, postal, ema

Kontakt

Wir haben Ihr Interesse geweckt oder Sie möchten uns einfach eine Frage stellen?
Gerne können Sie uns eine E-Mail verfassen oder sich telefonisch bei uns melden.

Wir freuen uns auf Ihre Anfrage!

Magic3W
Pelkovenstr. 148
80992 München