====== Web Server - Ubuntu Xenial Xerus 16.04 LTS ESM ====== I switched my VPS from a provider in Thailand to [[https://www.server4you.com/|Server4you]] on a server located in Strassbourg/France. As per 24th September 2021, the following OS are available for their least expensive Server S configuration: CentOS 7, Debian 8, and Ubuntu 16.04 LTS. I chose Ubuntu, as for Ubuntu [[https://ubuntu.com/security/esm|Extended Security Maintenance]] is available with security updates until April 2026. ===== Server Setup ===== * Register a Virtual Server at [[https://www.server4you.net/|Server4you]], then login and //Restore// under menu //vSERVER//. Choose your preferred OS (Ubuntu 16.04 LTS with LAMP) and wait for about 30 minutes for the server image to be ready. Note that Server4you has sites with TLD .net, .com, and .de, you must login on the same TLD you created the server. * Once the server is ready login via SSH as root with the password you defined in the previous step. Create your administrative user and add him to the sudoers:sudo adduser sudo vim /etc/group -> sudo:x:27: * For Ubuntu the first thing you should do is to register on the [[https://ubuntu.com/advantage|Ubuntu Advantage Portal]] so you can enable the [[https://ubuntu.com/blog/ubuntu-16-04-lts-transitions-to-extended-security-maintenance-esm|Ubuntu 16.04 LTS Extended Security Maintenance (ESM)]] with the following commands:# Install the latest UA client $ sudo apt update $ sudo apt install ubuntu-advantage-tools # Use the client to attach this machine to your contract using your UA token $ sudo ua attach # Ensure ESM-infra is enabled as well: $ sudo ua enable esm-infra $ sudo apt update $ sudo apt upgrade # UA status $ sudo ua status * change the machine name:sudo edit /etc/hostname sudo edit /etc/hosts * enable //force_color_prompt=yes// in file //~/.bashrc// and ///root/.bashrc// * add the following line to the sudoers file (not necessary for Debian) so .bashrc is read from root's home when opening a root shell:sudo visudo Defaults set_home ===== Apache ===== * Apache gets installed with image //Ubuntu 16.04 LTS with LAMP// through Server4you's setup. * Keep default apache installation as his will remain maintained through Ubuntu ESM. On time of installation (24th Sep 2021) this is Apache 2.4.18 and PHP 7.0. * Setup your virtual hosts * Install [[deb9:apache#let's_encrypt|Let's Encrypt]] * Install missing php modules:sudo apt install php php7.0-mysql php7.0-sqlite ===== ProFTP Server ===== * Install [[deb720:proftp|ProFTP Server]] ===== UFW ===== * Install [[deb9:ufw|UFW Firewall]] ===== BackupPC ===== * Setup [[deb10:backuppc#configuration_on_hosts|Configuration on Hosts for BackupPC]] ===== Links ===== * [[https://ubuntu.com/blog/ubuntu-16-04-lts-transitions-to-extended-security-maintenance-esm|Ubuntu 16.04 LTS transitions to Extended Security Maintenance (ESM)]]