Let's install a containerized web server stack on Linux! That will also deploy an intrusion prevention system with fail2ban, obtain trusted https certificates and a database server to install a WordPress blog.
We will use the free and open-source software Nginx.
Project Homepage: Documentation:
Prerequisites Linux Server running Ubuntu 20.04 LTS or newer Domain that points to the public IP of your Linux Server
How To Install and Use Docker on Ubuntu 20.04
Install Docker, and Docker-Compose You can still install Docker on a Linux Server that is not running Ubuntu, however, this may require different commands!
Install Docker
Check if Docker is installed correctly
Check if Docker-Compose is installed correctly
(Optional) Add your linux user to the docker group
Set up an Nginx Webserver
Create a new file docker-compose.ymlfile, please refer to the linuxserver/swag documentation: hub.docker.com/r/linuxserver/swag.
Example Docker-Compose File:
To start your webserver just execute the following command, while you're in the /opt/webserver_swag folder.
Add a database to the webserver
Update the Docker-Compose file
You can update your existing Docker-Compose template, if you want to add a database to your webserver. Because you often need a MySQL database, for example to deploy a WordPress Blog.
Example Docker-Compose File:
Download Details: Author: Muutassim Mukhtar
#webserver #linux