{"id":34888,"date":"2023-12-04T16:00:30","date_gmt":"2023-12-04T16:00:30","guid":{"rendered":"https:\/\/airoserver.com\/?p=34888"},"modified":"2023-12-04T07:30:22","modified_gmt":"2023-12-04T07:30:22","slug":"installing-and-configuring-apache-on-ubuntu","status":"publish","type":"post","link":"https:\/\/airoserver.com\/fr\/airoserver\/installation-et-configuration-dapache-sur-ubuntu\/","title":{"rendered":"Installation et configuration d'Apache sur Ubuntu"},"content":{"rendered":"<h3><strong>Diff\u00e9rences entre Apache sur les distributions Ubuntu et RedHat<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-34836 size-full\" src=\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-2.jpg\" alt=\"Apache\" width=\"1024\" height=\"550\" srcset=\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-2.jpg 1024w, https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-2-300x161.jpg 300w, https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-2-768x413.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>La raison pour laquelle nous devons sp\u00e9cifier la distribution Linux que nous utilisons pour installer Apache est que le processus d'installation et de configuration de ce serveur web est diff\u00e9rent dans chaque distribution. Par exemple, dans Ubuntu, le serveur web Apache est install\u00e9 via le paquetage apache2. Dans les distributions bas\u00e9es sur Redhat, le serveur web est install\u00e9 \u00e0 l'aide du paquetage httpd. Une autre diff\u00e9rence est que le fichier de configuration d'Apache est diff\u00e9rent dans chaque distribution. Par exemple, dans Ubuntu, les param\u00e8tres se trouvent dans le fichier <strong>\/etc\/apache2\/apache2.conf et \/etc\/apache2\/sites-available<\/strong>. Si dans les syst\u00e8mes d'exploitation Red Hat Base, les param\u00e8tres du serveur web se trouvent dans la section <strong>\/etc\/httpd\/conf\/httpd.conf.<\/strong><\/p>\n<h3><strong>Comment installer Apache sur Ubuntu<\/strong><\/h3>\n<p>Il existe diff\u00e9rentes fa\u00e7ons de l'installer sur Ubuntu. Si vous ne voulez que le logiciel original, ouvrez un terminal et entrez la commande suivante.<\/p>\n<p><strong>sudo apt-get install apache2 -y<\/strong><\/p>\n<p>Apr\u00e8s avoir ex\u00e9cut\u00e9 cette commande, il s'installera sur le serveur. Pour assurer la disponibilit\u00e9 du service Apache, vous pouvez utiliser la commande suivante.<\/p>\n<p><strong>sudo systemctl enable apache2.<\/strong><\/p>\n<p>Apache peut \u00eatre install\u00e9 dans les syst\u00e8mes d'exploitation Red Hat Base \u00e0 l'aide de la commande suivante.<\/p>\n<p><strong>apt install httpd<\/strong><\/p>\n<p>Saisissez l'adresse http:\/\/SERVER_IP dans votre navigateur (au lieu de SERVER IP, saisissez l'adresse IP de votre serveur).<\/p>\n<p>En affichant la page de bienvenue d'Apache, vous pouvez confirmer l'installation correcte de ce serveur web sur le serveur.<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-34835 size-full\" src=\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-3.jpg\" alt=\"Apache\" width=\"683\" height=\"900\" srcset=\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-3.jpg 683w, https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-3-228x300.jpg 228w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/h3>\n<p>Pour acc\u00e9der au fichier de page qu'Apache affiche, consultez l'adresse \/var\/www\/html.<\/p>\n<p>De cette mani\u00e8re, les param\u00e8tres de cette page sont d\u00e9finis dans le fichier index.html.<\/p>\n<h3><strong>Comment construire un site avec Apache<\/strong><\/h3>\n<p>Ce que nous voulons faire maintenant, c'est cr\u00e9er un h\u00f4te virtuel pour ce serveur afin de pouvoir l'utiliser pour h\u00e9berger plusieurs sites web. Ensuite, nous allons cr\u00e9er un h\u00f4te de test. Dans la premi\u00e8re \u00e9tape, nous cr\u00e9ons un r\u00e9pertoire pour l'h\u00f4te de test avec la commande suivante.<\/p>\n<p><strong>sudo mkdir -p \/var\/www\/html\/test<\/strong><\/p>\n<p>Ensuite, avec cette commande, nous d\u00e9finissons la propri\u00e9t\u00e9 du r\u00e9pertoire.<\/p>\n<p><strong>sudo chown -R $USER:$USER \/var\/www\/html\/test<\/strong><\/p>\n<p>Enfin, nous appliquons l'acc\u00e8s n\u00e9cessaire \u00e0 l'aide de la commande suivante.<\/p>\n<p><strong>sudo chmod -R 755 \/var\/www\/html\/test<\/strong><\/p>\n<p>Nous transf\u00e9rons le nouveau fichier index.html dans le nouveau dossier h\u00f4te.<\/p>\n<p><strong>sudo cp \/var\/www\/html\/index.html \/var\/www\/html\/test<\/strong><\/p>\n<p>Nous devons maintenant inclure ces param\u00e8tres dans un fichier destin\u00e9 \u00e0 Apache afin qu'il sache o\u00f9 se trouvent les fichiers de ces h\u00f4tes. Nous cr\u00e9ons un fichier dans \/etc\/apache\/sites-available.<\/p>\n<p><strong>sudo nano \/etc\/apache2\/sites-available\/test.conf<\/strong><\/p>\n<p>Saisissez les param\u00e8tres suivants dans le fichier.<\/p>\n<p><strong>ServerAdmin admin@example.com<\/strong><\/p>\n<p><strong>Nom du serveur example.com<\/strong><\/p>\n<p><strong>ServerAlias www.example.com<\/strong><\/p>\n<p><strong>DocumentRoot \/var\/www\/html\/test<\/strong><\/p>\n<p><strong>ErrorLog ${APACHE_LOG_DIR}\/error.log<\/strong><\/p>\n<p><strong>CustomLog ${APACHE_LOG_DIR}\/access.log combin\u00e9<\/strong><\/p>\n<p>Enfin, votre h\u00e9bergeur est cr\u00e9\u00e9 et vous pouvez h\u00e9berger votre site web.<\/p>","protected":false},"excerpt":{"rendered":"<p>Differences between Apache on Ubuntu and RedHat based distributions The reason why we need to specify which Linux distribution we are using to install Apache is that the process of installing and configuring this web server is different in each one. For example, in Ubuntu, the Apache web server is install through the apache2 package. [&hellip;]<\/p>","protected":false},"author":26,"featured_media":34837,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[179,1],"tags":[],"class_list":["post-34888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-airoserver","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installing and configuring Apache on Ubuntu - Airoserver | Cloud Hosting Solutions<\/title>\n<meta name=\"description\" content=\"We need to specify the Linux distribution we installed Apache the process of installing and configuring this web server varies in each one.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/airoserver.com\/fr\/airoserver\/installation-et-configuration-dapache-sur-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing and configuring Apache on Ubuntu - Airoserver | Cloud Hosting Solutions\" \/>\n<meta property=\"og:description\" content=\"We need to specify the Linux distribution we installed Apache the process of installing and configuring this web server varies in each one.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/airoserver.com\/fr\/airoserver\/installation-et-configuration-dapache-sur-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Airoserver | Cloud Hosting Solutions\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-04T16:00:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-04T07:30:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Codinoob\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Codinoob\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/\"},\"author\":{\"name\":\"Codinoob\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97\"},\"headline\":\"Installing and configuring Apache on Ubuntu\",\"datePublished\":\"2023-12-04T16:00:30+00:00\",\"dateModified\":\"2023-12-04T07:30:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/\"},\"wordCount\":478,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/airoserver.com\/#organization\"},\"articleSection\":[\"AiroServer\",\"Blog\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/\",\"url\":\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/\",\"name\":\"Installing and configuring Apache on Ubuntu - Airoserver | Cloud Hosting Solutions\",\"isPartOf\":{\"@id\":\"https:\/\/airoserver.com\/#website\"},\"datePublished\":\"2023-12-04T16:00:30+00:00\",\"dateModified\":\"2023-12-04T07:30:22+00:00\",\"description\":\"We need to specify the Linux distribution we installed Apache the process of installing and configuring this web server varies in each one.\",\"breadcrumb\":{\"@id\":\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/airoserver.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing and configuring Apache on Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/airoserver.com\/#website\",\"url\":\"https:\/\/airoserver.com\/\",\"name\":\"Airoserver | Cloud Hosting Solutions\",\"description\":\"Cloud server | Dedicated server | Domain | Hosting| SSL | Virtual server | Airoserver\",\"publisher\":{\"@id\":\"https:\/\/airoserver.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/airoserver.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/airoserver.com\/#organization\",\"name\":\"Airoserver | Cloud Hosting Solutions\",\"url\":\"https:\/\/airoserver.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png\",\"contentUrl\":\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png\",\"width\":925,\"height\":880,\"caption\":\"Airoserver | Cloud Hosting Solutions\"},\"image\":{\"@id\":\"https:\/\/airoserver.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97\",\"name\":\"Codinoob\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g\",\"caption\":\"Codinoob\"},\"sameAs\":[\"http:\/\/codinoob.ir\"],\"url\":\"https:\/\/airoserver.com\/fr\/author\/codinoob\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing and configuring Apache on Ubuntu - Airoserver | Cloud Hosting Solutions","description":"We need to specify the Linux distribution we installed Apache the process of installing and configuring this web server varies in each one.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/airoserver.com\/fr\/airoserver\/installation-et-configuration-dapache-sur-ubuntu\/","og_locale":"fr_FR","og_type":"article","og_title":"Installing and configuring Apache on Ubuntu - Airoserver | Cloud Hosting Solutions","og_description":"We need to specify the Linux distribution we installed Apache the process of installing and configuring this web server varies in each one.","og_url":"https:\/\/airoserver.com\/fr\/airoserver\/installation-et-configuration-dapache-sur-ubuntu\/","og_site_name":"Airoserver | Cloud Hosting Solutions","article_published_time":"2023-12-04T16:00:30+00:00","article_modified_time":"2023-12-04T07:30:22+00:00","og_image":[{"width":1024,"height":550,"url":"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/12\/Article-1.jpg","type":"image\/jpeg"}],"author":"Codinoob","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Codinoob","Dur\u00e9e de lecture estim\u00e9e":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#article","isPartOf":{"@id":"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/"},"author":{"name":"Codinoob","@id":"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97"},"headline":"Installing and configuring Apache on Ubuntu","datePublished":"2023-12-04T16:00:30+00:00","dateModified":"2023-12-04T07:30:22+00:00","mainEntityOfPage":{"@id":"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/"},"wordCount":478,"commentCount":0,"publisher":{"@id":"https:\/\/airoserver.com\/#organization"},"articleSection":["AiroServer","Blog"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/","url":"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/","name":"Installing and configuring Apache on Ubuntu - Airoserver | Cloud Hosting Solutions","isPartOf":{"@id":"https:\/\/airoserver.com\/#website"},"datePublished":"2023-12-04T16:00:30+00:00","dateModified":"2023-12-04T07:30:22+00:00","description":"We need to specify the Linux distribution we installed Apache the process of installing and configuring this web server varies in each one.","breadcrumb":{"@id":"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/airoserver.com\/airoserver\/installing-and-configuring-apache-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/airoserver.com\/"},{"@type":"ListItem","position":2,"name":"Installing and configuring Apache on Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/airoserver.com\/#website","url":"https:\/\/airoserver.com\/","name":"Airoserver | Cloud Hosting Solutions","description":"Cloud server | Dedicated server | Domain | Hosting| SSL | Virtual server | Airoserver","publisher":{"@id":"https:\/\/airoserver.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/airoserver.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/airoserver.com\/#organization","name":"Airoserver | Cloud Hosting Solutions","url":"https:\/\/airoserver.com\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/airoserver.com\/#\/schema\/logo\/image\/","url":"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png","contentUrl":"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png","width":925,"height":880,"caption":"Airoserver | Cloud Hosting Solutions"},"image":{"@id":"https:\/\/airoserver.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97","name":"Codinoob","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/airoserver.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g","caption":"Codinoob"},"sameAs":["http:\/\/codinoob.ir"],"url":"https:\/\/airoserver.com\/fr\/author\/codinoob\/"}]}},"_links":{"self":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/posts\/34888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/comments?post=34888"}],"version-history":[{"count":0,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/posts\/34888\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/media\/34837"}],"wp:attachment":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/media?parent=34888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/categories?post=34888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/tags?post=34888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}