Skip to content
Tell sea lions and mob harassers to FAQ Off!
Branch: master
Clone or download
Latest commit b06b547 Jul 14, 2019

README.md

FAQ Off

Support on Patreon Linux Build Status Latest Stable Version Latest Unstable Version License

FAQ Off lets you build gamebook-style FAQ websites to counteract sealioning and mob harassment on social media.

FAQ Off is a self-hostable microservice based on Slim Framework 3 and AnthroKit, developed by Soatok live on his Twitch.tv channel.

Public demo: https://faq.dhol.es

Invite links are given to Patreon supporters at the Brilliant tier and higher.

To learn more, please see the Patreon post that introduced FAQ Off.

Installation

Getting the Code and Dependencies

First, clone the git repository.

git clone https://github.com/soatok/faq-off target-dir-name

Next, run composer install --no-dev inside the destination directory.

Database Setup

Run bin/create-config.php to create a local configuration file. You should have valid PostgreSQL database credentials onhand at this stage.

Next, run bin/install to finish installing the database tables.

Webserver Configuration

Make sure you configure your virtual host to use the public directory as its document root.

  • BAD: /var/www/faq-off
  • Good: /var/www/faq-off/public

General rule: If your users can read this README.md file, you've configured your server incorrectly and need to go another layer down.

It's highly recommended that you use HTTPS (TLSv1.3, TLSv1.2). If you cannot afford a TLS certificate, Let's Encrypt offers free certificates with automatic renewal (via certbot).

For example, an nginx configuration might look like this:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    ssl_certificate /etc/letsencrypt/live/faq.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/faq.example.com/privkey.pem;

    include snippets/ssl-params.conf;

    root /var/www/faq-off/public;

    server_name faq.example.com;

    index index.php index.html index.htm;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
    }
    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ /.well-known {
        allow all;
    }
}

server {
    listen 80;
    listen [::]:80;

    root /var/www/faq-off/public;
    index index.html index.htm;

    server_name faq.example.com;

    location ~ /.well-known {
        allow all;
    }

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

    # Redirect to HTTPS
    return 301 https://faq.example.com$request_uri;
}
You can’t perform that action at this time.