{"id":1663,"date":"2021-09-21T19:00:47","date_gmt":"2021-09-21T18:00:47","guid":{"rendered":"http:\/\/ve2cuy.com\/420-3c3\/?page_id=1663"},"modified":"2024-10-03T17:11:10","modified_gmt":"2024-10-03T16:11:10","slug":"apache-hotes-virtuels","status":"publish","type":"page","link":"https:\/\/ve2cuy.com\/420-3c3\/?page_id=1663","title":{"rendered":"Apache2 &#8211; h\u00f4tes virtuels et .htaccess"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" width=\"768\" height=\"407\" src=\"http:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/09\/virtual_host.jpg\" alt=\"\" class=\"wp-image-2324\" style=\"aspect-ratio:1.886977886977887;width:421px;height:auto\" srcset=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/09\/virtual_host.jpg 768w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/09\/virtual_host-300x159.jpg 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Mise en contexte<\/h2>\n\n\n\n<p>Imaginez un seul serveur Web (apache2) qui loge (host) une multitude de sites web avec des noms de domaine diff\u00e9rents.<\/p>\n\n\n\n<p>Par exemple, le m\u00eame serveur publiant les sites <strong>abc.def<\/strong>, <strong>def.org<\/strong>, <strong>420-3c3.info<\/strong> et <strong>tropcool.infini<\/strong>. <\/p>\n\n\n\n<p>Ces sites r\u00e9pondants \u00e0 la m\u00eame adresse IP.<\/p>\n\n\n\n<p>Nous parlons ici d&rsquo;h\u00f4tes Web virtuels.<\/p>\n\n\n\n<p><strong><em>Apache2<\/em><\/strong> propose des fichiers de configuration pour impl\u00e9menter ce type de sc\u00e9nario.<\/p>\n\n\n\n<p>Ces fichiers sont situ\u00e9s dans le dossier &lsquo;<em><span class=\"has-inline-color has-vivid-purple-color\">\/etc\/apache2\/sites-available\/<\/span><\/em>&lsquo;.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-green-cyan-color has-text-color\">Voici la marche \u00e0 suivre<\/h2>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.0<\/span><\/strong> &#8211; Cr\u00e9er un r\u00e9pertoire pour les documents du nouveau site Web virtuel:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo mkdir -p \/var\/www\/site1.abc\/public_html<\/pre>\n\n\n\n<p class=\"has-text-align-left\"><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.1<\/span><\/strong> &#8211; Cr\u00e9er une page d&rsquo;accueil pour le nouveau site: <br><br><strong><em>sudo nano \/var\/www\/site1.abc\/public_html\/index.html<\/em><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!DOCTYPE html>\n&lt;html>\n  &lt;head>\n    &lt;meta charset=\"utf-8\">\n    &lt;title>Bienvenue \u00e0 site1.abc&lt;\/title>\n  &lt;\/head>\n  &lt;body>\n    &lt;h1>&lt;center>Bienvenue sur le site 'site1.abc'&lt;\/center>&lt;\/h1>\n  &lt;\/body>\n&lt;\/html><\/pre>\n\n\n\n<p class=\"has-text-align-left\"><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.2<\/span><\/strong> &#8211; Changer le propri\u00e9taire du dossier et de son contenu pour l&rsquo;utilisateur d&rsquo;apache2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown -R www-data: \/var\/www\/site1.abc<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-left\"><strong><span class=\"has-inline-color has-vivid-red-color\">NOTE<\/span><\/strong>: L&rsquo;utilisateur et le groupe associ\u00e9s \u00e0 l&rsquo;application <em><strong>apache2<\/strong><\/em> est d\u00e9fini dans le fichier \/etc\/apache2\/envvars<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">export APACHE_RUN_USER=www-data\nexport APACHE_RUN_GROUP=www-data<\/pre>\n\n\n\n<p class=\"has-text-align-left\"><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.3<\/span><\/strong> &#8211; Cr\u00e9er le fichier suivant: <\/p>\n\n\n\n<p class=\"has-text-align-left\"><strong><em>sudo nano \/etc\/apache2\/sites-available\/site1.abc.conf<\/em><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;VirtualHost *:80>\n\n    ServerName site1.abc\n\n    # Directive optionnelle\n    # ServerAlias www.site1.abc autre.org ...\n\n    # \u00c0 utiliser ensemble.  Utile lors d'un 404\n    # ServerAdmin webmaster@site1.abc\n    # ServerSignature EMail\n\n    DocumentRoot \/var\/www\/site1.abc\/public_html\n\n    # Section optionnelle, sinon les directives de apache2.conf s'appliquent.\n    &lt;Directory \/var\/www\/site1.abc\/public_html>\n        Options -Indexes +FollowSymLinks\n        AllowOverride All\n    &lt;\/Directory>\n\n    # Section optionnelle, sinon ${APACHE_LOG_DIR}\/other_vhosts_access.log sera utilis\u00e9.\n    ErrorLog ${APACHE_LOG_DIR}\/site1.abc-error.log\n    CustomLog ${APACHE_LOG_DIR}\/site1.abc-access.log combined\n\n&lt;\/VirtualHost><\/pre>\n\n\n\n<p class=\"has-text-align-left\"><strong><span class=\"has-inline-color has-vivid-red-color\">NOTE<\/span><\/strong>: Les fichiers du dossier <strong><em>\/etc\/apache2\/sites-available\/<\/em> <\/strong>renseignent sur les sites disponibles sur le serveur apache local.  <strong><span class=\"has-inline-color has-vivid-purple-color\">Par contre<\/span><\/strong>, il faudra les activer gr\u00e2ce \u00e0 des liens dans le dossier <strong><em>\/etc\/apache2\/sites-enabled\/<\/em><\/strong>.<\/p>\n\n\n\n<p>Explication des directives du fichier pr\u00e9c\u00e9dent:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td>VirtualHost *:80<\/td><td>Le serveur Web accepte toutes les requ\u00eates de toutes adresses IP via le port 80<\/td><\/tr><tr><td>ServerName<\/td><td>Le nom de domaine (DNS) \u00e0 utiliser pour afficher le site web<br>Note: Pour un test local, renseigner le fichier &lsquo;hosts&rsquo;<\/td><\/tr><tr><td>ServerAlias<\/td><td>Les sous domaines de ServerName.  Par exemple, www.mondomaine.com<\/td><\/tr><tr><td>DocumentRoot<\/td><td>Le dossier racine du site Web<\/td><\/tr><tr><td>&lt;Directory&gt;<\/td><td>Permet de renseigner des r\u00e8gles locales d&rsquo;acc\u00e8s aux ressources du site web <\/td><\/tr><tr><td><code>Options<\/code><br>-Indexes<br>+FollowsSymLinks<br> AllowOverride  <\/td><td><br>Pr\u00e9vient l&rsquo;affichage des fichiers du dossier web<br>Permet de suivre les liens symboliques<br>Permet la modification de la configuration globale d&rsquo;Apache2 via le fichier .htaccess<\/td><\/tr><tr><td>ErrorLog<br>CustomLog<br><\/td><td><br>Chemin d&rsquo;acc\u00e8s des fichiers &lsquo;log&rsquo;<br><br>Note:  La variable d&rsquo;environnement APACHE_LOG_DIR <br>est d\u00e9finie dans le fichier <em>\/etc\/apache2\/envvars<\/em> <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.4<\/span><\/strong> &#8211; Cr\u00e9er un lien symbolique pour activer le site:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo a2ensite site1.abc\n\n# Ou bien, manuellement avec:\n\nsudo ln -s \/etc\/apache2\/sites-available\/site1.abc.conf \/etc\/apache2\/sites-enabled\/<\/pre>\n\n\n\n<p class=\"has-text-align-left\"><strong><span class=\"has-inline-color has-vivid-red-color\">NOTE<\/span><\/strong>: La commande <strong><em>a2ensite<\/em><\/strong> permet de cr\u00e9er le lien symbolique dans le r\u00e9pertoire \/<strong><em>etc\/apache2\/sites-enabled\/<\/em><\/strong> directement \u00e0 partir du nom de domaine du site.<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.5<\/span><\/strong> &#8211; V\u00e9rifier la syntaxe des fichiers de configuration d&rsquo;apache2<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apachectl configtest<\/pre>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.6<\/span><\/strong> &#8211; Red\u00e9marrer le service pour activer les modifications:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart apache2<\/pre>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Action 1.7<\/span><\/strong> &#8211; Il ne reste plus qu&rsquo;\u00e0 tester le nouveau site virtuel:<\/p>\n\n\n<div class=\"wp-block-image is-resized\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1012\" height=\"308\" src=\"http:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-16.25.38.png\" alt=\"\" class=\"wp-image-1677\" style=\"aspect-ratio:3.2857142857142856;width:477px;height:auto\" srcset=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-16.25.38.png 1012w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-16.25.38-300x91.png 300w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-16.25.38-768x234.png 768w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/figure><\/div>\n\n\n<p class=\"has-text-align-left\"><strong><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">NOTE IMPORTANTE<\/span><\/strong>  :  Vous devez avoir renseigner un nom de domaine dans votre fichier &lsquo;hosts&rsquo; local pour pouvoir utiliser &lsquo;site1.abc&rsquo; dans l&rsquo;adresse du fureteur.  Pour Windows, ce fichier est localis\u00e9 dans <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">C:\\windows\\system32\\drivers\\etc<\/mark>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Action 1.8<\/mark><\/strong> &#8211; Visualiser le journal d&rsquo;acc\u00e8s du site<\/p>\n\n\n\n<p>Les journaux d&rsquo;apache2 sont, habituellement, localis\u00e9s dans le dossier <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\/var\/log\/apache2<\/mark>.<\/p>\n\n\n\n<p>Pour visualiser, en temps r\u00e9el, le contenu du journal d&rsquo;acc\u00e8s g\u00e9n\u00e9ral, il suffit d&rsquo;utiliser la commande suivante:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">tail -f \/var\/log\/apache2\/access.log<\/pre>\n\n\n\n<p>Il sera possible de visualiser le journal du site &lsquo;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">site1.abc<\/mark>&lsquo; en modifiant la commande ainsi:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">tail -f \/var\/log\/apache2\/site1.abc-access.log<\/pre>\n\n\n\n<p>RAPPEL &#8211; La localisation du journal d&rsquo;acc\u00e8s est renseign\u00e9e par la directive suivante:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CustomLog ${APACHE_LOG_DIR}\/site1.abc-access.log combined<\/pre>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">NOTE<\/mark><\/strong>: &lsquo;combined&rsquo; est un des formats de &lsquo;log&rsquo; d\u00e9fini dans le fichier <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">apache2.conf<\/mark>:<\/p>\n\n\n\n<p>Voir le document suivant pour la directive <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_log_config.html\">LogFormat<\/a><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">LogFormat \"%v:%p %h %l %u %t \\\"%r\\\" %>s %O \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\" vho>\nLogFormat \"%h %l %u %t \\\"%r\\\" %>s %O \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\" combined\nLogFormat \"%h %l %u %t \\\"%r\\\" %>s %O\" common\nLogFormat \"%{Referer}i -> %U\" referer\nLogFormat \"%{User-agent}i\" agent<\/pre>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">1.8.1<\/mark><\/strong> &#8211; Voici un exemple d&rsquo;un format de journal personnalis\u00e9:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">LogFormat \"Une requete de : %a pour -> %f\" perso\n\n# NOTE:  %a repr\u00e9sente l'adresse IP, %f le nom du fichier demand\u00e9.<\/pre>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">1.8.2<\/mark><\/strong> &#8211; Va produire ceci dans le journal:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Une requete de : 192.168.2.10 pour -> \/var\/www\/site1.abc\/public_html\/index.html<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-red-color has-text-color\">Laboratoire 1.9<\/h2>\n\n\n\n<ul>\n<li>Modifier le fichier de configuration du <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">site1.abc<\/mark> pour que les fichiers des journaux soient enregistr\u00e9s dans le dossier <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\/var\/www\/site1.abc\/journaux<\/mark> sous:\n<ul>\n<li>journal.log<\/li>\n\n\n\n<li>erreurs.log<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Tester le fonctionnement des journaux.<\/li>\n<\/ul>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Astuce<\/mark><\/strong> &#8211; Assurez-vous de bien indiquer le nom du dossier pour la localisation des journaux sinon l&rsquo;erreur suivante va se produire lors du rechargement du fichier de configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ sudo systemctl reload apache2.service \n\nJob for apache2.service failed.\nSee \"systemctl status apache2.service\" and \"journalctl -xeu apache2.service\" for details.\n\n$ sudo systemctl status apache2.service \n147653]: (2)No such file or directory: AH02297: Cannot access directory \n'\/var\/www\/site1.abc\/jounaux for log file ... <\/pre>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2 &#8211; <span class=\"has-inline-color has-vivid-red-color\">Laboratoire<\/span><\/h2>\n\n\n\n<p>Il faut proposer le site web de la <strong><em>cie-abc.tropcool<\/em><\/strong> sous wordpress version latest via l&rsquo;URL:<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>http:\/\/cie-abc.tropcool<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<ul>\n<li>Cr\u00e9er un compte mysql &lsquo;<strong>tropcool<\/strong>&lsquo; avec une BD &lsquo;<strong>tropcool<\/strong>&lsquo;. Mot de passe: <strong>password<\/strong>.<\/li>\n\n\n\n<li>T\u00e9l\u00e9charger et d\u00e9placer l&rsquo;application wordpress dans <strong>\/var\/www\/cie-abc.tropcool<\/strong>\/.<\/li>\n\n\n\n<li>Changer le propri\u00e9taire de<strong> \/var\/www\/cie-abc.tropcool<\/strong> pour le compte du processus apache2.<\/li>\n\n\n\n<li>Cr\u00e9er et renseigner le fichier apache2 &lsquo;<strong>\/etc\/apache2\/sites-available\/cie-abc.tropcool.conf<\/strong>&lsquo; pour le site virtuel. <\/li>\n\n\n\n<li>Cr\u00e9er le lien symbolique avec la commande <strong>a2ensite<\/strong>.<\/li>\n\n\n\n<li>Compl\u00e9ter l&rsquo;installation de WordPress.<\/li>\n\n\n\n<li>Renseigner le nom de domaine dans le fichier hosts local.<\/li>\n\n\n\n<li>Tester avec l&rsquo;URL <strong><em><span class=\"has-inline-color has-luminous-vivid-orange-color\">http:\/\/cie-abc.tropcool<\/span><\/em><\/strong>.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image is-resized\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"803\" src=\"http:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-17.56.10-1024x803.png\" alt=\"\" class=\"wp-image-1700\" style=\"aspect-ratio:1.2752179327521793;width:476px;height:auto\" srcset=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-17.56.10-1024x803.png 1024w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-17.56.10-300x235.png 300w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-17.56.10-768x602.png 768w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2021\/09\/Capture-decran-le-2021-09-21-a-17.56.10.png 1286w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">3 &#8211; Le fichier .htaccess &#8211; (configuration locale)<\/h2>\n\n\n\n<p>Les fichiers <code>.htaccess<\/code> sont utilis\u00e9s sur les serveurs web Apache pour configurer divers aspects de la gestion des sites web.  Ils sont utilis\u00e9s &#8211; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">si la directive &lsquo;AllowOverride All&rsquo; est renseign\u00e9e<\/mark> &#8211; pour d\u00e9finir, au niveau d&rsquo;un dossier de contenu web, des directives tel que:<\/p>\n\n\n\n<ol>\n<li><strong>Redirections<\/strong> : Ils permettent de rediriger les utilisateurs d&rsquo;une URL \u00e0 une autre (par exemple, rediriger une page supprim\u00e9e vers une nouvelle page).<\/li>\n\n\n\n<li><strong>Contr\u00f4le d&rsquo;acc\u00e8s<\/strong> : Vous pouvez restreindre l&rsquo;acc\u00e8s \u00e0 certaines parties de votre site, par exemple en prot\u00e9geant par mot de passe des r\u00e9pertoires.<\/li>\n\n\n\n<li><strong>R\u00e9\u00e9criture d&rsquo;URL<\/strong> : Ils permettent de cr\u00e9er des URL plus lisibles et conviviales, en transformant des URLs longues ou complexes en des formats plus simples.<\/li>\n\n\n\n<li><strong>Personnalisation des erreurs<\/strong> : Vous pouvez d\u00e9finir des pages d&rsquo;erreur personnalis\u00e9es, comme une page 404 pour les pages non trouv\u00e9es.<\/li>\n\n\n\n<li><strong>Configuration de la mise en cache<\/strong> : Vous pouvez g\u00e9rer le cache du navigateur pour am\u00e9liorer les performances de votre site.<\/li>\n\n\n\n<li><strong>Compression et optimisation<\/strong> : Il est possible d&rsquo;activer la compression gzip pour r\u00e9duire la taille des fichiers envoy\u00e9s aux utilisateurs.<\/li>\n\n\n\n<li><strong>S\u00e9curit\u00e9<\/strong> : Vous pouvez ajouter des directives pour am\u00e9liorer la s\u00e9curit\u00e9 de votre site, comme la pr\u00e9vention d&rsquo;attaques courantes.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<p>Les fichiers&nbsp;<code>.htaccess<\/code>&nbsp;(ou &laquo; fichiers de configuration distribu\u00e9s &raquo;) fournissent une m\u00e9thode pour modifier la configuration du serveur <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">au niveau d&rsquo;un r\u00e9pertoire<\/mark>. Un fichier, contenant une ou plusieurs directives de configuration, est plac\u00e9 dans un r\u00e9pertoire de documents particulier, et ses directives s&rsquo;appliquent \u00e0 ce r\u00e9pertoire et \u00e0 tous ses sous-r\u00e9pertoires.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading has-pale-pink-color has-text-color\">3.1 &#8211; Exemple d&rsquo;un fichier .htaccess pour WordPress<\/h3>\n\n\n\n<p>Dans le contexte de WordPress, le fichier <code>.htaccess<\/code> est souvent utilis\u00e9 pour g\u00e9rer des redirections, des permaliens et des r\u00e8gles de s\u00e9curit\u00e9. Voici un exemple classique de contenu de fichier <code>.htaccess<\/code> pour un site WordPress :<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># BEGIN WordPress\n&lt;IfModule mod_rewrite.c>\nRewriteEngine On\nRewriteBase \/\nRewriteRule ^index\\.php$ - [L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . \/index.php [L]\n&lt;\/IfModule>\n# END WordPress<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3.1.2 &#8211; Explication des lignes :<\/h3>\n\n\n\n<ul>\n<li><strong>RewriteEngine On<\/strong> : Active le module de r\u00e9\u00e9criture d&rsquo;URL.<\/li>\n\n\n\n<li><strong>RewriteBase \/<\/strong> : D\u00e9finit la base pour les r\u00e8gles de r\u00e9\u00e9criture.<\/li>\n\n\n\n<li><strong>RewriteRule ^index.php$ &#8211; [L]<\/strong> : Si l&rsquo;URL demand\u00e9e est <code>index.php<\/code>, ne rien changer et passer \u00e0 la fin.<\/li>\n\n\n\n<li><strong>RewriteCond %{REQUEST_FILENAME} !-f<\/strong> : V\u00e9rifie si le fichier demand\u00e9 n&rsquo;existe pas.<\/li>\n\n\n\n<li><strong>RewriteCond %{REQUEST_FILENAME} !-d<\/strong> : V\u00e9rifie si le r\u00e9pertoire demand\u00e9 n&rsquo;existe pas.<\/li>\n\n\n\n<li><strong>RewriteRule . \/index.php [L]<\/strong> : Redirige toutes les autres demandes vers <code>index.php<\/code>, permettant \u00e0 WordPress de g\u00e9rer la requ\u00eate.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3.2 &#8211; Autres exemples d&rsquo;utilisation :<\/h3>\n\n\n\n<h3 class=\"wp-block-heading has-pale-pink-color has-text-color\">3.2.1 &#8211; <strong>Redirection d&rsquo;HTTP vers HTTPS<\/strong> :<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   RewriteEngine On\n   RewriteCond %{HTTPS} off\n   RewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<\/pre>\n\n\n\n<p>D\u00e9taillons cette r\u00e8gle de redirection qui force l&rsquo;utilisation de HTTPS :<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-pale-pink-color has-text-color\">3.2.1.2 &#8211; Explication des lignes<\/h3>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color\">Ligne 1 &#8211; <strong><code>RewriteEngine On<\/code><\/strong><\/p>\n\n\n\n<ul>\n<li>Cette directive active le moteur de r\u00e9\u00e9criture d&rsquo;URL. Sans cette ligne, les r\u00e8gles suivantes ne seront pas prises en compte.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color\">Ligne 2 &#8211; <strong><code>RewriteCond %{HTTPS} off<\/code><\/strong><\/p>\n\n\n\n<ul>\n<li><strong>Condition de r\u00e9\u00e9criture<\/strong> : Cette ligne v\u00e9rifie si la connexion n&rsquo;est pas s\u00e9curis\u00e9e, c&rsquo;est-\u00e0-dire si l&rsquo;utilisateur acc\u00e8de au site via HTTP plut\u00f4t que HTTPS.<\/li>\n\n\n\n<li><strong><code>%{HTTPS}<\/code><\/strong> est une variable qui indique si la connexion est s\u00e9curis\u00e9e (<code>on<\/code> pour HTTPS, <code>off<\/code> pour HTTP). Ici, la condition s&rsquo;applique uniquement lorsque cette variable est <code>off<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color\">Ligne 3 &#8211; <strong><code>RewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<\/code><\/strong><\/p>\n\n\n\n<ul>\n<li><strong><code>RewriteRule ^<\/code><\/strong> : Cette r\u00e8gle s&rsquo;applique \u00e0 toutes les requ\u00eates (<code>^<\/code> signifie &laquo; d\u00e9but de la cha\u00eene &raquo;, donc tout correspond ici).<\/li>\n\n\n\n<li><strong><code>https:\/\/%{HTTP_HOST}%{REQUEST_URI}<\/code><\/strong> : Si la condition est remplie (c&rsquo;est-\u00e0-dire que la connexion est en HTTP), cette r\u00e8gle redirige la requ\u00eate vers la version HTTPS de l&rsquo;URL.\n<ul>\n<li><strong><code>%{HTTP_HOST}<\/code><\/strong> : repr\u00e9sente le nom de domaine du site (par exemple, <code>www.votresite.com<\/code>).<\/li>\n\n\n\n<li><strong><code>%{REQUEST_URI}<\/code><\/strong> : repr\u00e9sente la partie de l&rsquo;URL apr\u00e8s le nom de domaine (par exemple, <code>\/chemin\/vers\/page<\/code>).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong><code>[L,R=301]<\/code><\/strong> :\n<ul>\n<li><strong><code>L<\/code><\/strong> : indique que c&rsquo;est la derni\u00e8re r\u00e8gle \u00e0 appliquer si cette r\u00e8gle est ex\u00e9cut\u00e9e. Aucune autre r\u00e8gle ne sera consid\u00e9r\u00e9e apr\u00e8s celle-ci.<\/li>\n\n\n\n<li><strong><code>R=301<\/code><\/strong> : indique qu&rsquo;il s&rsquo;agit d&rsquo;une redirection permanente (301). Cela signifie que les moteurs de recherche et les navigateurs mettront \u00e0 jour l&rsquo;URL et consid\u00e9reront la version HTTPS comme la version canonique.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">En r\u00e9sum\u00e9<\/h3>\n\n\n\n<p>Cette r\u00e8gle force toute connexion non s\u00e9curis\u00e9e (HTTP) \u00e0 \u00eatre redirig\u00e9e vers sa version s\u00e9curis\u00e9e (HTTPS). Cela am\u00e9liore la s\u00e9curit\u00e9 de votre site en s&rsquo;assurant que toutes les communications entre le serveur et le navigateur sont chiffr\u00e9es.<\/p>\n\n\n\n<p>C&rsquo;est une bonne pratique pour tout site web aujourd&rsquo;hui, surtout si vous traitez des informations sensibles ou personnelles. Si vous avez d&rsquo;autres questions ou besoin d&rsquo;autres exemples, n&rsquo;h\u00e9sitez pas !<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading has-pale-pink-color has-text-color\">3.2.2 &#8211; <strong>Personnalisation de la page d&rsquo;erreur 404<\/strong> :<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   ErrorDocument 404 \/404.php<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Pr\u00e9cautions :<\/h3>\n\n\n\n<ul>\n<li><strong>Sauvegarde<\/strong> : Avant de modifier le fichier <code>.htaccess<\/code>, sauvegardez l\u2019original.<\/li>\n\n\n\n<li><strong>Test<\/strong> : Apr\u00e8s les modifications, testez le site pour vous assurer que tout fonctionne correctement.<\/li>\n\n\n\n<li><strong>Syntaxe<\/strong> : Une erreur de syntaxe dans ce fichier peut rendre le site inaccessible.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-red-color has-text-color\">3.3 &#8211; Laboratoire<\/h2>\n\n\n\n<p>Il faut renseigner un fichier .htaccess pour le site <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">site1.abc<\/mark> avec les directives suivantes:<\/p>\n\n\n\n<ul>\n<li><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">La requ\u00eate d&rsquo;une page inexistante retourne ceci:<\/mark><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"260\" src=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.44.30-1024x260.png\" alt=\"\" class=\"wp-image-2361\" style=\"aspect-ratio:3.9384615384615387;width:415px;height:auto\" srcset=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.44.30-1024x260.png 1024w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.44.30-300x76.png 300w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.44.30-768x195.png 768w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.44.30.png 1088w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<ul>\n<li><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">Une requ\u00eate \u00e0 partir d&rsquo;une adresse IP autre que celle de votre poste de travail ou celle de votre voisin,  retourne ceci:<\/mark><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"285\" src=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.57.05-1024x285.png\" alt=\"\" class=\"wp-image-2363\" style=\"aspect-ratio:3.7037037037037037;width:422px;height:auto\" srcset=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.57.05-1024x285.png 1024w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.57.05-300x84.png 300w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.57.05-768x214.png 768w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-12.57.05.png 1062w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<ul>\n<li><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u00c9crire une r\u00e8gle .htaccess qui renvoi toute requ\u00eate d\u00e9butant par <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">ind<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"> vers <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">index.html<\/mark><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"283\" src=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-13.22.06-1024x283.png\" alt=\"\" class=\"wp-image-2365\" style=\"aspect-ratio:3.618374558303887;width:429px;height:auto\" srcset=\"https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-13.22.06-1024x283.png 1024w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-13.22.06-300x83.png 300w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-13.22.06-768x212.png 768w, https:\/\/ve2cuy.com\/420-3c3\/wp-content\/uploads\/2024\/10\/Capture-decran-le-2024-10-02-a-13.22.06.png 1080w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">NOTE<\/mark><\/strong>: Vous pouvez utiliser chatgpt pour cette r\u00e8gle.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-pale-pink-color has-text-color\">3.3.1 &#8211; Astuces pour le labo<\/h2>\n\n\n\n<p>1 &#8211; Les directives d&rsquo;acc\u00e8s par une adresse IP doivent-\u00eatre plac\u00e9es dans une directive &lsquo;&lt;RequireAny&gt;&rsquo;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;RequireAny>\n  ...    \n&lt;\/RequireAny>\n<\/pre>\n\n\n\n<p>2 &#8211; Acc\u00e8s \u00e0 un dossier Web avec un fichier .htaccess qui contient des erreurs de configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Internal Server Error\nThe server encountered an internal error or misconfiguration and was unable to complete your request.\n\nPlease contact the server administrator at webmaster@site1.abc to inform them of the time this error occurred, and the actions you performed just before this error.\n\nMore information about this error may be available in the server error log.<\/pre>\n\n\n\n<p>Fichier erreur.log<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[Wed Oct 02 16:09:58.098665 2024] [core:alert] [pid 147786] [client 192.168.2.10:49780] \/var\/www\/site1.abc\/public_html\/.htaccess: Unknown Authz provider: IP<\/pre>\n\n\n\n<p>3 &#8211; Il sera peut-\u00eatre n\u00e9cessaire d&rsquo;activer le module &lsquo;rewrite&rsquo; pour la redirection de page web.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo a2enmod rewrite\nsudo systemctl restart apache2<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading has-text-align-right\">Document r\u00e9dig\u00e9 par Alain Boudreault &#8211; aka ve2cuy &#8211; version 2024.10.02.01<\/h5>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mise en contexte Imaginez un seul serveur Web (apache2) qui loge (host) une multitude de sites web avec des noms de domaine diff\u00e9rents. Par exemple, le m\u00eame serveur publiant les sites abc.def, def.org, 420-3c3.info et tropcool.infini. Ces sites r\u00e9pondants \u00e0 la m\u00eame adresse IP. Nous parlons ici d&rsquo;h\u00f4tes Web virtuels. Apache2 propose des fichiers de [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"_links":{"self":[{"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=\/wp\/v2\/pages\/1663"}],"collection":[{"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1663"}],"version-history":[{"count":48,"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=\/wp\/v2\/pages\/1663\/revisions"}],"predecessor-version":[{"id":2390,"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=\/wp\/v2\/pages\/1663\/revisions\/2390"}],"wp:attachment":[{"href":"https:\/\/ve2cuy.com\/420-3c3\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}