2skies.com :: basic http authentication with lighttpd

Password protection can limit access to your website or a specific sub-directory. lighttpd.conf Make sure you enable mod_access and mod_auth in your lighttpd.conf: server.modules += ( « mod_access » ) server.modules += ( « mod_auth » ) htpasswd #htpasswd -c ~/lighttpd/foo-auth.xt username Running this command will prompt for this user’s new password to store in the txt file. Combining […]

» Blocking Asterisk hacking/scanning attempts with fail2ban

Warning – if you follow these instructions fail2ban will, by default, be protecting you against other scans such as ssh attempts. This means though that if you get your IP blocked you will not be able to connect to your server from that IP. Ensure that you whitelist your IP by following the instructions at […]

Signer ses emails avec DKIM

Signer ses emails avec DKIM Si vous avez un serveur mail, utilisant postfix, alors voici un outil très pratique pour prouver la provenance des emails envoyés par votre serveur, en leur collant une signature numérique, fonctionnant avec une clé publique/privée. Cela permettra ainsi d’affirmer que vos emails sont bien envoyés par vous, et également de […]

APC + petit PC

<span class="html">Want to avoid segmentation with  apc.shm_segments?If your linux server limits the shared memory block  size and you're forced to use apc.shm_segments instead, change the  setting by using (here is 512M but change it as you like): # sysctl -w kernel.shmmax=536870912 (but if you want the change to be permanent after a restart you would have to add […]

How To Prevent Duplicate Content Issue On WordPress Blogs

How To Prevent Duplicate Content Issue On WordPress Blogs Written by Chakkravarthi Topics: Blog Seo WordPress is considered one of the most powerful blogging system on the net, but that doesn’t mean it do not have any drawbacks while using it. From the seo point of view it has a big drawback of duplicate content […]

Simple PHP mail wrapper ( log centralisé des mails depuis php )

Si vous voulez centraliser les logs des mails envoyés depuis PHP, voici une technique simple avec un bash, qui vient entre php et Linux /usr/sbin/sendmail-wrapper-php: #!/bin/sh logger -p mail.info sendmail-wrapper-php: site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME}, pwd=${PWD}, uid=${UID}, user=$whoami/usr/sbin/sendmail -t -i Il faut bien sur le rendre executable chmod 755 /usr/sbin/sendmail-wrapper-php Ce script va donc envoyer au syslog […]

Tutoriel sur UTF-8 avec PHP et MySQL

UTF-8 PHP MYSQL (histoire d’encodage) * Accueil * UTF-8 PHP MySql * Barre de progression d’upload en PHP Encodage et programmation Les caractères qui s’affichent sur les écrans d’ordinateur, comme toute donnée informatique, ne sont qu’une sucession de 0 et de 1 du point de vue de la machine. C’est le nombre et l’ordonnance de […]

Listes noires, blacklists, RBL ou DNSBL

Définition de LISTES NOIRES, RBL ou DNSBL : Les RBL (Realtime Blackhole List) ou DNSBL (Black List DNS) sont des listes de serveurs ou de réseaux IP connus pour aider, accueillir, produire ou retransmettre des spams ou fournir un service pouvant être utilisé comme support pour l’expédition de spams : OpenSMTP Relay, Open Proxy List […]

Postfix Flush the Mail Queue

Traditionally you use the « sendmail -q » command to flush mail queue under Sendmail MTA. Under Postfix MTA, just enter the following command to flush the mail queue: # postfix flush OR # postfix -f To see mail queue, enter: # mailq To remove all mail from the queue, enter: # postsuper -d ALL To remove […]

Personnaliser Apache avec .htaccess | Farid KASMI

Il est possible de modifier l’apparence d’Apache en bidouillant un peu le fichier httpd.conf ou les fichiers .htaccess. Le mieux serait de modifier httpd.conf mais pour beaucoup ce n’est pas possible, en effet à moins d’avoir un serveur maison ou un serveur dédié qui coute une fortune, on est souvent limité à modifier le fichier […]