Comment créer un sous domaine ou transférer un domaine d'un serveur vers un autre
Création d'un fichier de configuration apache à mettre dans le répertoire /etc/apache2/mods-available Donner le nom domaine.com.conf
<VirtualHost *:80>
DocumentRoot /home/sites/domaine.com
ServerName domaine.com
<Directory /home/sites/domaine.com>
AllowOverride All
Allow from all
Require all granted
</Directory>
</VirtualHost>
changer de propriétaire
chown -R www-data /home/sites/domaine.com
a2ensite site.conf sudo a2ensite domaine service apache2 reload
apt-get install certbot apt-get install python-certbot-apache
certbot certonly --standalone -d domaine --pre-hook "systemctl stop apache2" --post-hook "systemctl start apache2" certbot --apache -d domaine