Config/tools for getting a basic LEMP server off the ground and easy to configure for multiple users/domains and subdomains.
Find a file
2024-10-25 15:27:23 -06:00
install allow per-site custom nginx config, improving permissions 2024-10-25 15:27:23 -06:00
add-site.sh allow per-site custom nginx config, improving permissions 2024-10-25 15:27:23 -06:00
install.sh bug fixes 2024-10-22 20:32:46 -06:00
README.md Refactor installation script and add cautionary note in README 2024-10-24 20:12:54 -06:00
site-config.conf allow per-site custom nginx config, improving permissions 2024-10-25 15:27:23 -06:00
update-site.sh allow per-site custom nginx config, improving permissions 2024-10-25 15:27:23 -06:00

Web Server Setup Scripts

This repository contains scripts for setting up a very basic web server and adding new sites. It is not perfect, but it will get you off the ground quickly.

Installation

These commands will clone the tool onto your server and do the basic installation and configuration of core server software. At the moment that is Nginx, PHP, MySQL, and Certbot. A variety of fail2ban and ufw security measures are also added to improve your security posture.

# clone the repository and cd into it
git clone https://github.com/joby-lol/webserver-config && cd webserver-config && sudo ./install.sh

Obviously you should probably at least kind of verify what that script will do before you go executing random code off the internet. You do you though.

Adding a site

To set up a site, run add-site.sh and it will prompt you for all the data necessary. What you will need before running it is:

  • A domain name using Cloudflare's DNS, with both @ and * subdomains pointing at your server
    • If you want to use their proxy, you need to turn on the SSL/TLS encryption mode of Full, Full(Strict), or Strict(SSL-Only Origin Pull). Flexible or Off will not work.
  • A Cloudflare API key capable of editing the DNS for that domain