Server security


PHP settings are defined in:

Locate .ini files

Console environment

$ php --ini
Configuration File (php.ini) Path: /etc/php
Loaded Configuration File:         /etc/php/php.ini
Scan for additional .ini files in: /etc/php/conf.d
Additional .ini files parsed:      /etc/php/conf.d/xdebug.ini

Server environment


fail2ban is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses iptables profiles to block brute-force attempts:

Read Shaarli logs to ban IPs

Example configuration:


enabled  = true
port     = https,http
filter   = shaarli-auth
logpath  = /var/www/path/to/shaarli/data/log.txt
maxretry = 3
bantime = -1


before = common.conf
failregex = \s-\s<HOST>\s-\sLogin failed for user.*$
ignoreregex = 

Robots - Restricting search engines and web crawler traffic

Creating a robots.txt with the following contents at the root of your Shaarli installation will prevent honest web crawlers from indexing each and every link and Daily page from a Shaarli instance, thus getting rid of a certain amount of unsollicited network traffic.

User-agent: *
Disallow: /