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 =