Sécurisez vos backends – apache, nginx, php, memcache

Voilà, on a une config avec Varnish qui est capable d’encaisser la totalité du trafic sans broncher (ça me fait penser que je dois terminer la traduction d’un article qui explique comment bien optimiser Apache).
Évidemment seul Varnish est censé pouvoir être accessible de l’extérieur et les backends doivent ne pouvoir être accédés que depuis Varnish lui même.

Dans mon cas, tout se trouve sur la même bécane et donc tout ce qui est backend doit écouter sur localhost/127.0.0.1 uniquement.

Read More…

Posted in Hosting at January 7th, 2012. Comments Off on Sécurisez vos backends – apache, nginx, php, memcache.

Script init.d pour php-cgi (spawn-fcgi-php)

J’ai longtemps galéré pour trouver un script décent pour lancer php-cgi via init.d utilisant start-stop-daemon.

Intérêt de spawn-fcgi plutôt qu’un mod apache?

  • Privilege separation without needing a suid-binary or running a server as root.
  • You can restart your web server and the FastCGI applications without restarting the others.
  • You can run them in different chroot()s.
  • Running your FastCGI applications doesn’t depend on the web server you are running, which allows for easier testing of/migration to other web servers.

C’est ce dernier point qui m’a fait craquer, apache, nginx, cherokee, autres, tous ou presque supportent un accès à php de cette façon

Je voulais donc vous faire profiter de ma découverte.

Read More…

Posted in Web at January 2nd, 2012. 3 Comments.