Ubuntu Installation
Will use a ubuntu-lts-live-server
image.
Ubuntu Configuration
Fix unallocted disk space after install
Will show the allocated amount in default unit /dev/mapper/ubuntu--vg-ubuntu--lv
vgdisplay
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
Update/Upgrade
sudo apt update && upgrade -y
sudo apt autoremove
sudo apt autoclean
sudo apt clean
Disable SSH with root user
sudo nano /etc/ssh/sshd_config
Find these line and change
...
PermitRootLogin no
...
sudo systemctl restart sshd
Install Docker
Set up Docker's apt repository.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Install the Docker packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Using Apache
Install Apache2
sudo apt install apache2 apache2-doc apache2-utils
sudo systemctl status apache2
sudo a2dissite 000-default-conf
sudo systemctl reload apache2
Activate the Firewall (Apache and OpenSSH)
sudo ufw allow 'Apache Full'
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status
Config the apache vhosts to proxy to other servers (HTTP only)
Install the modules
cd /etc/apache2/sites-enabled
sudo a2enmod proxy proxy_http
sudo systemctl restart apache2
Creating VHOST files
Make a new file for each new hostname.domain
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/00x-domain_url.conf
<VirtualHost *:80>
ProxyPreserveHost On
ServerName domain_url
ProxyPass / http://[IP]:[PORT]
ProxyPassReverse / http://[IP]:[PORT]
</VirtualHost>
sudo a2ensite 00x-domain_url.conf