It serves multiple static websites with letsencrypt certificates.
- A DNS entry that links this server's ip to f.e.
www.example.com.
# Prerequisite
sudo apt-get install -y git
# Setup
git clone https://github.com/mthpvg/nginx-letsencrypt.git
cd nginx-letsencrypt
# Start
./bin/start.sh
# Create a static website
./bin/create_website.sh name@provider.com www.example.com example.com
# Or:
./bin/create_website.sh name@provider.com sub.example.com
# Create a node application that runs on port 3042:
./bin/create_node_application.sh name@provider.com 3042 www.example.com example.com
# Or:
./bin/create_node_application.sh name@provider.com 3042 sub.example.comChange the content of the website in the following directory: /var/www/example.com. And check the result at http://www.example.com.
sudo systemctl reload nginx- www and non-www redirections
- logs
- set -eu