The Assure Alliance support website. This website is based on Questions2Answers and is a forum for support using Biblical Tools

Overview

Assure Support Site

Repository and information for the Assure Support Site

Structure

.
├── README.md               # This file
├── docker-compose.yml      # Launches the web service in two containers
├── q2a_site/               # Question2Answer website source code
└── startup.sh              # Startup script for launching on remote server

Local Startup

Make sure the following credentials are set:

  • In q2a_site/qa-config.php
    • QA_MYSQL_HOSTNAME
      • Must be set to the name of the DB container defined in docker-compose.yml
    • QA_MYSQL_USERNAME
      • Matches the MYSQL_USER environment variable below
    • QA_MYSQL_PASSWORD
      • Matches the MYSQL_PASSWORD environment variable below
    • QA_MYSQL_DATABASE
      • Matches the MYSQL_DATABASE environment variable below
  • In ./docker-compose.yml
    • MYSQL_ROOT_PASSWORD
    • MYSQL_DATABASE
    • MYSQL_USER
    • MYSQL_PASSWORD

Then run:

docker compose up -d

Finally, navigate to http://localhost in your web browser

Launching to AWS

  1. Create a new EC2 instance
    • Name can be anything
  2. Select an image (Ubuntu 20.04 was used for testing, Amazon Linux works if you change a line in the startup script)
  3. Select/create a key pair for ssh access
  4. Select/create a network security group with the following rules:
    • Type: HTTP, Protocol: TCP, Port Range: 80, Source: 0.0.0.0/0
    • Type: ssh, Protocol: TCP, Port Range: 22, Source:
  5. Click Launch Instance
  6. While waiting for the instance to boot, click on it and copy its public IPv4 address
  7. Connect to your instace with the following command (note you may need to sudo, depending on file permissions):
    • ssh -i @
    • will either be ubuntu or ec2-user, depending on whether you chose Ubuntu or Amazon Linux as the image
  8. Once connected, run the following commands:
    • sudo yum install -y git
    • git clone https://github.com/ubsicap/assure_support_site.git
    • cd assure_support_site
      • Note: If you chose Amazon Linux, change the line near the bottom of the startup script to install_dependencies "Amazon Linux"
    • sh startup.sh
  9. You will be prompted to create a MySQL root password, account username, account password, and database name.
  10. Once you have created credentials, the docker-compose.yml file will be ran and two containers will start.
  11. Open your web browser to http://
  12. You will be prompted to create an administrator account for the website.
  13. Once created, you can access the site through the aforementioned IP address.

Custom Domain Name

Setting up a custom domain is split into multiple parts, listed below:

Elastic IP

  1. From the AWS EC2 Console, search for "Elastic IP"
  2. Click "Allocate Elastic IP Address"
    • Note there is a charge for this if the address does not get associated with an EC2 instance
  3. Select the IPv4 address pool option desired
    • For development, we used "Amazon's pool of IPv4 addresses"
  4. Allocate the address
  5. After the IP was generated, click "Actions" and then "Associate"
  6. Associate the Elastic IP with the EC2 instance running the server

More info can be found here.

Register Domain Name

  1. Register a domain name through your service of choice
    • freenom was used for development
    • Dev domain name is supportsitetest.tk
    • Used "freenom DNS" instead of custom name server
  2. Create the following DNS records:
    NAME TYPE TTL TARGET
    A 3600
    www A 3600

Link Together

Once the above steps have been taken, you should be able to navigate to http:// OR http:// and you will arrive at the same web page.

SSL Certification

Using Certbot

Before attempting this, please ensure that HTTPS traffic is not yet allowed by navigating to https:// in your web browser. Do not attempt the following steps if the site is already certified.

Note: This requires a custom domain name to bet set up first. Also, every time docker compose down or an equivalent command is run to terminate the q2a-apache container, this process will need to be repeated.

VERY IMPORTANT NOTE: If you are developing, be sure to include the --test-cert flag when running certbot, otherwise you risk being rate limited! For production, simply omit this flag.

  1. Ensure that the web server is live (EC2 instance & Docker containers).

  2. Connect to the EC2 instance (ssh -i @, just like above)

  3. Once connected, run the following two commands:

    # Install certbot & apache plugin (if needed)
    docker exec q2a-apache apt-get install -y certbot python3-certbot-apache
    
    # Run certbot interactively
    docker exec -it q2a-apache certbot --test-cert --apache
  4. You will be prompted for your email, two y/n questions, and the domain name of the site

    • The email is used for contact about SSL renewal
    • The questions should be answered Y then N
  5. If successful, you will see a message stating that the site is now certified

  6. Navigate to https:// and verify that HTTPS traffic is allowed

More information can be found here.

Manually (For development ONLY)

Note: In order for this to work, the following files must be located on the EC2 instance in /home/$USER/ssl_keys/:

  • certificate.crt
  • ca_bundle.crt
  • private.key

Once these files are in place, open startup.sh and comment out the call to ssl_certify at the end of the file. Also, uncomment manual_ssl_cert.

Now re-run sh startup.sh and navigate to https:// in your browser to verify that HTTPS traffic is allowed.

More information can be found here.

You might also like...
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

A curated list of awesome Laravel bookmarks, packages, tools, articles, tutorials and related resources.

ATTENTION: This list is obsolete and discontinued. Please find a much more comprehensive, much more well-maintained awesome-laravel list at chiraggude

A PocketMine plugin with advanced world tools and maybe can beat MultiWorld

WorldTools A PocketMine plugin with advanced world tools and maybe can beat MultiWorld This plugin is on development! Helping me with pull request may

The ErrorHandler component provides tools to manage errors and ease debugging PHP code

ErrorHandler Component The ErrorHandler component provides tools to manage errors and ease debugging PHP code. Getting Started $ composer require symf

This tools helps you with Collectors in DependecyInjection, Console shortcuts, ParameterProvider as service and many more.

Package Builder This tools helps you with Collectors in DependecyInjection, Console shortcuts, ParameterProvider as service and many more. Install com

Install an execute script of specify quality tools to your git pre-commit hook, and it executes only for changed files

Quality Hook Installer Install an execute script of specify quality tools to your git pre-commit hook, and it executes only for changed files Install

Tools for working with the SPDX license list and validating licenses.

composer/spdx-licenses SPDX (Software Package Data Exchange) licenses list and validation library. Originally written as part of composer/composer, no

Bug bounty tools built in PHP to help penetration tester doing the job

BugBountyTools-PHP Bug bounty tools built in PHP to help penetration tester doing the job Website who using this script: KitaBantu Soon! 403 Bypasser

Owner
United Bible Societies Institute for Computer Assisted Publishing
United Bible Societies Institute for Computer Assisted Publishing
Phalcon official Forum

Phosphorum 3 Phosphorum is an engine for building flexible, clear and fast forums. You can adapt it to your own needs or improve it if you want. Pleas

The Phalcon PHP Framework 361 Dec 27, 2022
A forum software written in vanilla PHP with a MariaDB/MySQL database.

GloomyBB GloomyBB is a simple forum software written in vanilla PHP with a MariaDB/MySQL database. It is currently still in early development but is u

John Vinh 3 Nov 2, 2022
Set of classes and tools to communicate with a Noso wallet using NosoP

NosoPHP Set of classes and tools to communicate with a Noso wallet using NosoP(Noso Protocol) Examples Node Info include __DIR__ . '/vendor/autoload.p

Noso Project 1 Jan 10, 2022
Automate aggregation tools to standard alerts from SAP PI/PO (CBMA) for internal support team

✅ PiAlert PiAlert is system for automating the work of SAP PI/PO support team via aggregation of alerts (CBMA messages). Language support: English Рус

Ivan Shashurin 3 Dec 2, 2022
Small library providing some functional programming tools for PHP, based on Rambda

Functional library for PHP. Features: set of useful functions helpful in functional programming all functions are automatically curried every array ca

Wojciech Nawalaniec 5 Jun 16, 2022
Set of front-end tools for Magento 2 based on Gulp.js

Magento 2 Frontools Set of front-end tools for Magento 2 Requirements Unix-like OS (please, do not ask about Windows support) Node.js LTS version. We

SNOW.DOG 433 Dec 6, 2022
The main website source code based on php , html/css/js and an independent db system using xml/json.

jsm33t.com Well umm, a neat website LIVE SITE » View Demo · Report Bug · Request a feature About The Project Desc.. Built Using Php UI Frameworks Boot

Jasmeet Singh 5 Nov 23, 2022
A story about SQLinject and a demonstration of some vulnerabilities and tools

Предысловие Если не умру,буду дальше развивать эту тему Идея которая пришла мне в голову,<<А почему бы не рассказать об уязвимостях SQL?>>.Поэтому я б

null 0 Jun 11, 2022
This Kirby V3 Plugin brings snippets and blueprints together in one place. It includes useful tools that completely changing the way you work with Kirby: Fast and well organized.

Kirby Components Overview Do you love to make awesome projects with Kirby CMS? Do you also find it difficult to switch between snippets and blueprints

Roman Gsponer 6 May 31, 2023
Add custom armors, tools and many items!

CustomThings This plugin was created for the new version of Hiroshima and allows you to add tools, armors and items! Informations Here are the differe

null 13 Oct 16, 2021