Page 1 sur 1

[Résolu]Site : faire une redirection HTTP=>HTTPS

Publié : 18 janv. 2025 11:48
par Otyugh
Salut,
il manque une redirection HTTP=>HTTPS au site.

Illustration

Code : Tout sélectionner

curl -D- http://libreaquimperle.netlib.re
#curl: (28) Failed to connect to libreaquimperle.netlib.re port 80 after 129224 ms: Couldn't connect to server
Il devrait y avoir une redirection (sans quoi taper ."libreaquimperle.netlib.re" dans la barre d'adresse de firefox retournera un timeout).

Re: Site : faire une redirection HTTP=>HTTPS

Publié : 18 janv. 2025 15:00
par lann
J'ai fait quelques modifications sur le fichier Virtual Host, mais chez moi ça fonctionnait déjà.

Code : Tout sélectionner

curl -D- http://libreaquimperle.netlib.re
HTTP/1.1 301 Moved Permanently
Date: Sat, 18 Jan 2025 13:55:39 GMT
Server: Apache
Location: https://libreaquimperle.netlib.re/
Content-Length: 242
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://libreaquimperle.netlib.re/">here</a>.</p>
</body></html>
Tu peux réessayer

Re: Site : faire une redirection HTTP=>HTTPS

Publié : 18 janv. 2025 19:54
par Otyugh
Toujours pas j'ai un timeout en HTTP, tu dois avoir une règle qui ne marche qu'en local ! (je connais :mrgreen:)

Un outil sympa pour tester comme si on venait de l'extérieur (si tu as tor d'installé) c'est la commande torify.

Code : Tout sélectionner

torify curl -D- curl -D- http://libreaquimperle.netlib.re
Et pour mettre un exemple qui tourne :

Code : Tout sélectionner

curl icanhazip.com
#37.171.215.144
torify curl icanhazip.com
#192.42.116.176

Re: Site : faire une redirection HTTP=>HTTPS

Publié : 19 janv. 2025 13:33
par lann
Tu peux essayer maintenant.
ça devrait marcher

Re: Site : faire une redirection HTTP=>HTTPS

Publié : 19 janv. 2025 15:48
par Otyugh
Je confirme !