Advanced Search
Search Results
95 total results found
Installation
Installing the package apt install fail2ban systemctl enable fail2ban Making the config file to look like this touch /etc/fail2ban/jail.local nano -w /etc/fail2ban/jail.local [sshd] enabled = false [apache-auth] enabled = true port = http,ht...
Operations
fail2ban-client status fail2ban-client status apache-modsecurity fail2ban-client set apache-modsecurity unbanip IP
Bookstack
An open source content management system
Installation
Initial setup
Installing dependencies
According to the manual, we need the following PHP extensions gd, dom, iconv, mbstring, mysqlnd, openssl, pdo, pdo_mysql, tokenizer, xml Yet as it turns out, openssl и pdo_mysql are missing from the repositories so installing as is. We also need curl and zip e...
Creating database
Dropping anonymous user and a default DB. Blocking remote root connections mariadb-secure-installation Setting the root password or using the unix_socket ensures that nobody can log into the MariaDB root user without the proper authorisation. You already...
Installing BookStack
Downloading CMS cd /var/www/ mkdir bookstack git clone https://github.com/BookStackApp/BookStack.git --branch release --single-branch bookstack cd bookstack/ composer install --no-dev Setting up an APP_URL, DB connection details and language # Applicati...
Configuring Apache
Creating a configuration file for a virtual host touch /etc/apache2/sites-available/bookstack.conf nano -w /etc/apache2/sites-available/bookstack.conf <VirtualHost *:80> # This is a simple example of an Apache VirtualHost configuration ...
Enabling HTTPS
It's assumed that you already have certificates signed by LetsEncrypt (more details here)Updating the virtual host config file cd /etc/apache2/sites-available/ cp bookstack.conf bookstack.conf_ echo > bookstack.conf nano -w bookstack.conf <VirtualHost *:8...
Let's Encrypt
Free RSA X.509 certificates from Let's Encrypt
Wildcard certificate with updates over API
Installing lego (ref link) cd /var/tmp curl -Ls https://api.github.com/repos/go-acme/lego/releases/latest | \ grep browser_download_url | grep linux_amd64 | cut -d '"' -f 4 | \ wget -i - tar xf lego_v*_linux_amd64.tar.gz mv lego /usr/local/sbin/ Che...
Additional functionality
Additional functionality for Bookstack
Version control
Setting up revision limit nano -w /var/www/bookstack/.env # Set the revision limit to 200 # Defaults to '100' REVISION_LIMIT=1
Recycle bin auto cleanup
Setting up documents lifetime nano -w /var/www/bookstack/.env # Set a recycle bin item lifetime of 30 days RECYCLE_BIN_LIFETIME=30
Removing the old document versions
Setting up Logical Theme System mkdir /var/www/bookstack/themes/custom mkdir /var/www/bookstack/themes/custom/includes cd /var/www/bookstack/themes/custom touch includes/prune.revisions.php touch functions.php chown -R root:www-data /var/www/bookst...
Opening links in a new window by default
Adding the following JavaScript to HTML Metadata <!-- Open links in a new tab --> <script type="module"> const links = document.querySelectorAll('.page-content a'); for (const link of links) { link.target = '_blank'; } </script> <!-...
RSS Feed
Setting up Logical Theme System cd /var/www/bookstack/themes/custom mkdir templates touch includes/rss.feed.php touch templates/rss.blade.php chown -R root:www-data /var/www/bookstack/themes/custom/ chmod -R 755 /var/www/bookstack/themes/custom/ Des...
Bash
BASH Repository