J'ai revérifié la doc sur lamp, Apache2 et serveurs virtuels mais ça ne m'a pas vraiment éclairé ma lanterne.
localhost est toujours rediirigé vers
https://localhost
Pas trouvé de fichier .htacces ni dans /etc/apache2/* ni dans /var/www/*
Dans /etc/apache2/sites-available et /etc/apache2/sites-enabled il y avait un fichier jitsi.com que j'ai supprimé.
Et dans le fichier /etc/hosts j'ai rajouté une ligne unapeda :
pierre@Yoga-2-13:/etc/apache2/sites-available$ cat /etc/hosts
127.0.0.1 unapeda
127.0.0.1 localhost
127.0.1.1 Yoga-2-13
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
pierre@Yoga-2-13:/etc/apache2/sites-available$ curl -I http://localhost
HTTP/1.1 200 OK
Date: Sun, 08 Nov 2020 17:43:41 GMT
Server: Apache/2.4.41 (Ubuntu)
Last-Modified: Sun, 08 Nov 2020 17:32:00 GMT
ETag: "e5-5b39bd2c42cb5"
Accept-Ranges: bytes
Content-Length: 229
Vary: Accept-Encoding
Content-Type: text/html
La ligne HTTP est donc passée de
HTTP/1.1 301 Moved Permanently
à
HTTP/1.1 200 OK
Mais après redémarrage d'apache par
sudo systemctl restart apache2
lorsque je tape :
- localhost , j'ai
https://localhost
- localhost/index.html : OK
- localhost/info.php : OK