Recently Updated Pages
404 page
A simple 404 page <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device...
Landing page
A simple landing page <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=de...
Murphy's Law
#!/bin/bash funny_bunny(){ cat << EOF |---------------| | sysrq-trigger | |---...
RSS Feed
Setting up Logical Theme System cd /var/www/bookstack/themes/custom mkdir templates touch in...
Opening links in a new window by default
Adding the following JavaScript to HTML Metadata <!-- Open links in a new tab --> <script type=...
Removing the old document versions
Setting up Logical Theme System mkdir /var/www/bookstack/themes/custom mkdir /var/www/bookstack...
Recycle bin auto cleanup
Setting up documents lifetime nano -w /var/www/bookstack/.env # Set a recycle bin item lifetime...
Version control
Setting up revision limit nano -w /var/www/bookstack/.env # Set the revision limit to 200 # De...
Enabling HTTPS
It's assumed that you already have certificates signed by LetsEncrypt (more details here)Updating...
Wildcard certificate with updates over API
Installing lego (ref link) cd /var/tmp curl -Ls https://api.github.com/repos/go-acme/lego/rel...
Configuring Apache
Creating a configuration file for a virtual host touch /etc/apache2/sites-available/bookstack.c...
Installing BookStack
Downloading CMS cd /var/www/ mkdir bookstack git clone https://github.com/BookStackApp/BookSta...
Creating database
Dropping anonymous user and a default DB. Blocking remote root connections mariadb-secure-instal...
Installing dependencies
According to the manual, we need the following PHP extensions gd, dom, iconv, mbstring, mysqlnd, ...
Operations
fail2ban-client status fail2ban-client status apache-modsecurity fail2ban-client set apache-mod...
Installation
Installing the package apt install fail2ban systemctl enable fail2ban Making the config file t...
Port Knocking
Installing knockd apt install knockd systemctl enable knockd Making the config file to look ...
Base Config
Creating a configuration file mkdir /etc/iptables touch /etc/iptables/rc.firewall chmod +x /et...
Logging
Creating a config file and setting things up (more details here) mkdir /etc/systemd/journald.con...
Client
Setting up a timezone timedatectl list-timezones timedatectl set-timezone Pacific/Auckland Che...