{"id":498,"date":"2024-08-16T10:00:41","date_gmt":"2024-08-16T10:00:41","guid":{"rendered":"https:\/\/tassadanslesmyriades.fr\/?p=498"},"modified":"2024-08-16T20:11:59","modified_gmt":"2024-08-16T20:11:59","slug":"mettre-un-site-en-ligne","status":"publish","type":"post","link":"https:\/\/tassadanslesmyriades.fr\/?p=498","title":{"rendered":"202408_tuto Mettre un site en ligne"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\r\n<div class=\"ez-toc-title-container\">\r\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\r\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\r\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#Deployer_Apache\" >D\u00e9ployer Apache<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#1_Lancer_Apache_via_XAMPP\" >1. Lancer Apache via XAMPP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#2_Placer_les_fichiers_de_ton_site\" >2. Placer les fichiers de ton site<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#3_Configurer_un_hote_virtuel_Virtual_Host\" >3. Configurer un h\u00f4te virtuel (Virtual Host)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#5_Redemarrer_Apache\" >5. Red\u00e9marrer Apache<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#6_Acceder_a_ton_site\" >6. Acc\u00e9der \u00e0 ton site<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#7_Configurer_la_base_de_donnees\" >7. Configurer la base de donn\u00e9es<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/tassadanslesmyriades.fr\/?p=498\/#8_Tester_et_Deployer\" >8. Tester et D\u00e9ployer<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Deployer_Apache\"><\/span>D\u00e9ployer Apache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Lancer_Apache_via_XAMPP\"><\/span>1. <strong>Lancer Apache via XAMPP<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ouvre le panneau de contr\u00f4le XAMPP (<code>xampp-control.exe<\/code>).<\/li>\n\n\n\n<li>Dans le panneau, clique sur le bouton <strong>\u00ab\u00a0Start\u00a0\u00bb<\/strong> \u00e0 c\u00f4t\u00e9 d&rsquo;Apache. Une fois lanc\u00e9, tu devrais voir un message indiquant que le service est d\u00e9marr\u00e9.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Placer_les_fichiers_de_ton_site\"><\/span>2. <strong>Placer les fichiers de ton site<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Le r\u00e9pertoire par d\u00e9faut o\u00f9 Apache sert les fichiers web sous XAMPP est <code>C:\\xampp\\htdocs\\<\/code>.<\/li>\n\n\n\n<li>Cr\u00e9e un nouveau dossier dans <code>htdocs<\/code> pour ton site, par exemple \u00ab\u00a0nomdusite\u00a0\u00bb.<\/li>\n\n\n\n<li>Place tous les fichiers de ton site web (HTML, CSS, JS, PHP, etc.) dans ce dossier. Si tu utilises WordPress, d\u00e9compresse-le ici.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Configurer_un_hote_virtuel_Virtual_Host\"><\/span>3. <strong>Configurer un h\u00f4te virtuel (Virtual Host)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pour que ton site r\u00e9ponde \u00e0 <code>nomdusite.fr<\/code>, tu peux configurer un h\u00f4te virtuel dans Apache :\n<ol class=\"wp-block-list\">\n<li><strong>Modifier le fichier <code>httpd-vhosts.conf<\/code><\/strong> :\n<ul class=\"wp-block-list\">\n<li>Le fichier se trouve ici : <code>C:\\xampp\\apache\\conf\\extra\\httpd-vhosts.conf<\/code>.<\/li>\n\n\n\n<li>Ouvre-le avec un \u00e9diteur de texte (comme Notepad++) et ajoute les lignes suivantes :<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n\n\n\n<p>Ouvre-le avec un \u00e9diteur de texte (comme Notepad++) et ajoute les lignes suivantes :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n    ServerAdmin admin@nomdusite.fr\n    DocumentRoot \"C:\/xampp\/htdocs\/nomdusite\"\n    ServerName nomdusite.fr\n    ServerAlias www.nomdusite.fr\n    ErrorLog \"logs\/nomdusite-error.log\"\n    CustomLog \"logs\/nomdusite-access.log\" combined\n&lt;\/VirtualHost><\/code><\/pre>\n\n\n\n<p>2. <strong>Activer le fichier <code>httpd-vhosts.conf<\/code><\/strong> :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ouvre le fichier principal de configuration d&rsquo;Apache : <code>C:\\xampp\\apache\\conf\\httpd.conf<\/code>.<\/li>\n\n\n\n<li>Cherche la ligne suivante et enl\u00e8ve le <code>#<\/code> au d\u00e9but si ce n\u2019est pas d\u00e9j\u00e0 fait :<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>Include conf\/extra\/httpd-vhosts.conf<\/code><\/pre>\n\n\n\n<p>4. <strong>Modifier le fichier <code>hosts<\/code> de Windows<\/strong><\/p>\n\n\n\n<p>Pour que <code>nomdusite.fr<\/code> pointe vers ton serveur local, tu dois modifier le fichier <code>hosts<\/code> de Windows :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ouvre le fichier <code>C:\\Windows\\System32\\drivers\\etc\\hosts<\/code> avec un \u00e9diteur de texte en mode administrateur.<\/li>\n\n\n\n<li>Ajoute la ligne suivante \u00e0 la fin du fichier :<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1    nomdusite.fr<\/code><\/pre>\n\n\n\n<p>Sauvegarde et ferme le fichier.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Redemarrer_Apache\"><\/span>5. <strong>Red\u00e9marrer Apache<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Retourne dans le panneau de contr\u00f4le XAMPP et clique sur <strong>\u00ab\u00a0Stop\u00a0\u00bb<\/strong> puis <strong>\u00ab\u00a0Start\u00a0\u00bb<\/strong> pour red\u00e9marrer Apache et appliquer les modifications.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Acceder_a_ton_site\"><\/span>6. <strong>Acc\u00e9der \u00e0 ton site<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ouvre ton navigateur et tape <code>nomdusite.fr<\/code> dans la barre d&rsquo;adresse. Si tout est bien configur\u00e9, ton site devrait s&rsquo;afficher.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Configurer_la_base_de_donnees\"><\/span>7. <strong>Configurer la base de donn\u00e9es<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Si tu utilises une base de donn\u00e9es (comme pour WordPress), assure-toi que les informations de connexion \u00e0 la base (<code>nomdelabasededonn\u00e9es<\/code>) sont correctement configur\u00e9es dans tes fichiers PHP (par exemple dans <code>wp-config.php<\/code> pour WordPress).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"8_Tester_et_Deployer\"><\/span>8. <strong>Tester et D\u00e9ployer<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Teste ton site pour t&rsquo;assurer que tout fonctionne comme pr\u00e9vu : navigateurs, formulaires, connexions \u00e0 la base de donn\u00e9es, etc.<\/li>\n\n\n\n<li>Si tu rencontres des probl\u00e8mes, tu peux consulter les fichiers de log dans <code>C:\\xampp\\apache\\logs\\<\/code> pour diagnostiquer les erreurs.<\/li>\n<\/ul>\n\n\n\n<p>Avec ces \u00e9tapes, ton site devrait \u00eatre accessible localement via <code>nomdusite.fr<\/code> sur ton installation XAMPP. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tuto feat. Xampp, Apache, etc.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[10,54],"class_list":["post-498","post","type-post","status-publish","format-standard","hentry","category-tech","tag-tech","tag-tuto"],"_links":{"self":[{"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=\/wp\/v2\/posts\/498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=498"}],"version-history":[{"count":3,"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=\/wp\/v2\/posts\/498\/revisions"}],"predecessor-version":[{"id":512,"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=\/wp\/v2\/posts\/498\/revisions\/512"}],"wp:attachment":[{"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tassadanslesmyriades.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}