Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
deb11:pluto [2022/07/30 16:16] – [Crontab] Bernard Condraudeb11:pluto [2022/09/25 15:28] – [Web Server - Debian Bullseye 11.4 (VPS)] Bernard Condrau
Line 1: Line 1:
-====== Web Server - Debian Buster 11.4 (VPS) ======+====== Web Server - Debian Bullseye 11.4 (VPS) ======
   * I originally switched my VPS from a provider in Thailand to a VPS provided by [[https://www.server4you.com/|Server4you]] 24<sup>th</sup> September 2021, but they announced to discontinue offering VPS in 2022.   * I originally switched my VPS from a provider in Thailand to a VPS provided by [[https://www.server4you.com/|Server4you]] 24<sup>th</sup> September 2021, but they announced to discontinue offering VPS in 2022.
   * I switched 27<sup>th</sup> July 2022 to [[https://contabo.com/en/|Contabo]] which is a German company running servers in all parts of the world. I chose server location Düsseldorf/Germany and Debian 11.4 as OS.   * I switched 27<sup>th</sup> July 2022 to [[https://contabo.com/en/|Contabo]] which is a German company running servers in all parts of the world. I chose server location Düsseldorf/Germany and Debian 11.4 as OS.
 +  * Read [[deb11:migrate|How to migrate a (web) server]]
 +
  
 ===== VPS specification ===== ===== VPS specification =====
Line 13: Line 15:
   * My VPS was ready within 5 minutes after order placement   * My VPS was ready within 5 minutes after order placement
  
-===== Server Setup ===== +===== Installation ===== 
-  * Login to the server via SSH as root +  * [[deb11:setup|Setup]] 
-  * Install sudo, create the main user, and add him to the sudoers group<code># apt install sudo +  * [[deb9:ssh|SSH Access]]
-# adduser <user> +
-# vi /etc/group (add <user> to line "sudo:x:27:<user>")</code> +
-  * change the machine name:<code>sudo edit /etc/hostname +
-sudo edit /etc/hosts</code> +
-  * enable //force_color_prompt=yes// in file //~/.bashrc// and ///root/.bashrc//+
  
-===== Security ===== +===== Pluto ===== 
-  * Configure [[deb9:ssh|SSH Access]] +  * [[deb9:apache|Apache 2.4 & PHP 7/8]] 
-  * Install [[deb9:ufw|UFW Firewall]] +  * [[deb11:certbot|Let's Encrypt Certbot]]
-  * Disable root login by changing file ''/etc/passwd'' from line 1 to line 2<code>root:x:0:0:root:/root:/bin/bash +
-root:x:0:0:root:/root:/sbin/nologin</code> +
- +
-===== Apache 2.4 & PHP 8.1 with SSL ===== +
-  * Install Apache<code>$ sudo apt update +
-$ sudo apt install apache2</code> +
-  * Install PHP - [[https://tecadmin.net/how-to-install-php-on-debian-11/|How To Install PHP (8.1, 7.4 & 5.6) on Debian 11]]<code>$ sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https gnupg +
-$ sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +
-$ wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add - +
-$ sudo apt update +
-$ sudo apt install php8.1 php8.1-mysql php8.1-sqlite3 +
-</code> +
-  * Enable required modules<code>$ sudo a2enmod rewrite +
-$ sudo a2enmod ssl</code> +
-  * Setup your virtual hosts +
-  * Create sub folders in ''/var/log/apache2'' if you setup log files for the virtual hosts in sub folders +
-  * Install [[deb11:certbot|Let's Encrypt Certbot]] +
- +
-===== ProFTP Server =====+
   * Install [[deb720:proftp|ProFTP Server]]   * Install [[deb720:proftp|ProFTP Server]]
- 
-===== BackupPC ===== 
   * Setup [[deb10:backuppc#configuration_on_hosts|Configuration on Hosts for BackupPC]]   * Setup [[deb10:backuppc#configuration_on_hosts|Configuration on Hosts for BackupPC]]
  
-===== Crontab ===== 
-  * Root<code>$ sudo crontab -e 
-35 3 * * 6 certbot renew && /etc/init.d/apache2 restart</code> 
-===== Other apps ===== 
-==== Install ==== 
-  * <code>$ sudo apt update 
-$ sudo apt install vim 
-$ sudo apt install zip 
-$ sudo apt install rsync</code> 
- 
-==== Config ==== 
-  * Change visudo editor<code>$ sudo update-alternatives --config editor</code>