Vincent Faliès - Artisan Codeur

PHPunit : Test a method with redirection

php web Development phpunit test
Reading time: 1 minute, 0 seconds

Development's tests are a mandatory step for guarantee the validity and viability of the code. Sometimes, the tests writing are not trivial. For instance, a method can do an HTTP redirection :

class MyClass
     * Method to redirect to
    public function doRedire...

Continue reading...

HTTPS redirection

web system nginx ssl apache
Reading time: 1 minute, 0 seconds

Several methods exist to redirect traffic from HTTP to HTTPS automaticaly.


From virtual host

The definition fo the redirection is simple, we must specify that all connection on standard port must be rewrite to HTTPS protocol.


Continue reading...

GZip compression with Nginx

system nginx gzip compression
Reading time: 1 minute, 0 seconds

When you reviewing your website with Google Pagespeed Insights, you could have the following error :

To fix this problem, a little modification of Nginx configuration is necessary :

In /etc/nginx/nginx.conf file or in new file /etc/nginx/conf.d/gzip.conf, add the following code :


Continue reading...

SSH Keys

system security linux ssh
Reading time: 1 minute, 0 seconds

The objective of the generation and export of the SSH keys is the possibility to connect to the server without typing a login / password.


On the server, .ssh directory must be present in home directory of the user used by the client. For instance, if the client use vincent account to...

Continue reading...

KISS principle

Development Principles POO
Reading time: 1 minute, 0 seconds

KISS principle or Keep it simple, stupid is a design guideline that recommends simplicity and and forbidden all unnecessary complixety.

Complexity is a source of production costs, maintenance and therefore errors. Keep it simple, limit unwanted effets.

The KISS principle also makes it easier...

Continue reading...