Les deux révisions précédentes
Révision précédente
|
|
cr:travaux-2019-05-24 [2019/05/25 02:49] jyhem [Création du virtual host] |
cr:travaux-2019-05-24 [2019/05/25 02:54] (Version actuelle) jyhem |
| |
| |
<note>root@web:/home/jmlibs# cp /etc/apache2/sites-available/arn-fai.net.conf /etc/apache2/sites-available/hackstub.netlib.re.conf | <code>root@web:/home/jmlibs# cp /etc/apache2/sites-available/arn-fai.net.conf /etc/apache2/sites-available/hackstub.netlib.re.conf |
root@web:/home/jmlibs# vi /etc/apache2/sites-available/hackstub.netlib.re.conf | root@web:/home/jmlibs# vi /etc/apache2/sites-available/hackstub.netlib.re.conf |
| |
To activate the new configuration, you need to run: | To activate the new configuration, you need to run: |
systemctl reload apache2 | systemctl reload apache2 |
</note> | </code> |
| |
Test | Test |
<note>root@web:/home/jmlibs# apache2ctl configtest | <code>root@web:/home/jmlibs# apache2ctl configtest |
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:8 | AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:8 |
[Fri May 17 22:25:33.543159 2019] [alias:warn] [pid 27126] AH00671: The Alias directive in /etc/apache2/conf-enabled/acme-challenges.conf at line 1 will probably never match because it overlaps an earlier Alias. | [Fri May 17 22:25:33.543159 2019] [alias:warn] [pid 27126] AH00671: The Alias directive in /etc/apache2/conf-enabled/acme-challenges.conf at line 1 will probably never match because it overlaps an earlier Alias. |
SSLCertificateFile: file '/etc/letsencrypt/www.hackstub.netlib.re/www.hackstub.netlib.re.crt+chain' does not exist or is empty | SSLCertificateFile: file '/etc/letsencrypt/www.hackstub.netlib.re/www.hackstub.netlib.re.crt+chain' does not exist or is empty |
Action 'configtest' failed. | Action 'configtest' failed. |
</note> | </code> |
| |
Deux problèmes | Deux problèmes |
| |
| |
<note>root@web:/home/jmlibs/backups_hackstub.netlib.re# mkdir /var/www/hackstub.netlib.re | <code>root@web:/home/jmlibs/backups_hackstub.netlib.re# mkdir /var/www/hackstub.netlib.re |
root@web:/home/jmlibs/backups_hackstub.netlib.re# cd /var/www/hackstub.netlib.re/</note> | root@web:/home/jmlibs/backups_hackstub.netlib.re# cd /var/www/hackstub.netlib.re/</code> |
| |
Je commente la partie SSL | Je commente la partie SSL |
<note>root@web:/var/www/hackstub.netlib.re# vi -u /home/jmlibs/.vimrc /etc/apache2/sites-available/hackstub.netlib.re.conf | <code>root@web:/var/www/hackstub.netlib.re# vi -u /home/jmlibs/.vimrc /etc/apache2/sites-available/hackstub.netlib.re.conf |
root@web:/var/www/hackstub.netlib.re# vi -u /home/jmlibs/.vimrc /etc/apache2/sites-available/hackstub.netlib.re.conf | root@web:/var/www/hackstub.netlib.re# vi -u /home/jmlibs/.vimrc /etc/apache2/sites-available/hackstub.netlib.re.conf |
root@web:/var/www/hackstub.netlib.re# apache2ctl configtest | root@web:/var/www/hackstub.netlib.re# apache2ctl configtest |
root@web:/var/www/hackstub.netlib.re# apache2ctl restart | root@web:/var/www/hackstub.netlib.re# apache2ctl restart |
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:8 | AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:8 |
[Fri May 17 22:39:53.367721 2019] [alias:warn] [pid 27265] AH00671: The Alias directive in /etc/apache2/conf-enabled/acme-challenges.conf at line 1 will probably never match because it overlaps an earlier Alias.</note> | [Fri May 17 22:39:53.367721 2019] [alias:warn] [pid 27265] AH00671: The Alias directive in /etc/apache2/conf-enabled/acme-challenges.conf at line 1 will probably never match because it overlaps an earlier Alias.</code> |
| |
Et je peux tester en mettant | Et je peux tester en mettant |
<note>/etc/hosts | <code>/etc/hosts |
89.234.141.68 hackstub.netlib.re</note> | 89.234.141.68 hackstub.netlib.re</code> |
| |
Récupération des backups des fichiers | Récupération des backups des fichiers |
<note>root@web:/var/www/hackstub.netlib.re# mkdir landpage | <code>root@web:/var/www/hackstub.netlib.re# mkdir landpage |
root@web:/var/www/hackstub.netlib.re/landpage/# wget https://web.archive.org/web/20190227114712/https://hackstub.netlib.re/landpage/ -O index.html</note> | root@web:/var/www/hackstub.netlib.re/landpage/# wget https://web.archive.org/web/20190227114712/https://hackstub.netlib.re/landpage/ -O index.html</code> |
| |
Puis il faut récrire les liens dans index.html et télécharger tout le reste. | Puis il faut récrire les liens dans index.html et télécharger tout le reste. |
| |
Comme letsencrypt demande que le DNS soit correct, on commence en http. | Comme letsencrypt demande que le DNS soit correct, on commence en http. |
<note>root@web:/var/www/hackstub.netlib.re# vi -u /home/jmlibs/.vimrc /etc/apache2/sites-available/hackstub.netlib.re.conf</note> | <code>root@web:/var/www/hackstub.netlib.re# vi -u /home/jmlibs/.vimrc /etc/apache2/sites-available/hackstub.netlib.re.conf</code> |
→ Commenter la section 443 | → Commenter la section 443 |
| |
===== Homepage ===== | ===== Homepage ===== |
| |
<note>root@web:/var/www/hackstub.netlib.re/landpage# rm ../index.html | <code>root@web:/var/www/hackstub.netlib.re/landpage# rm ../index.html |
root@web:/var/www/hackstub.netlib.re/landpage# cat ../index.php | root@web:/var/www/hackstub.netlib.re/landpage# cat ../index.php |
<?php | <?php |
header("location: /landpage/");</note> | header("location: /landpage/");</code> |
| |
===== Autres services ===== | ===== Autres services ===== |