{"id":375,"date":"2023-01-04T14:00:33","date_gmt":"2024-04-17T13:13:49","guid":{"rendered":""},"modified":"2025-02-02T00:46:15","modified_gmt":"2025-02-01T23:46:15","slug":"comment-impl-menter-ghost-blog-avec-nginx-sur-debian-12","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/comment-impl-menter-ghost-blog-avec-nginx-sur-debian-12\/","title":{"rendered":"Comment impl\u00e9menter Ghost Blog avec Nginx sur Debian 12"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<div class=\"container\">\n<h1>Comment impl\u00e9menter Ghost Blog avec Nginx sur Debian 12<\/h1>\n<p>Ghost est une plateforme de blog open-source populaire, l\u00e9g\u00e8re et facile \u00e0 d\u00e9ployer. Dans ce guide, nous allons vous montrer comment impl\u00e9menter Ghost Blog avec Nginx sur Debian 12. Cette configuration est id\u00e9ale pour ex\u00e9cuter votre blog Ghost sur un <a href=\"https:\/\/netcloud24.com?language=french&amp;currency=4\" target=\"_blank\" rel=\"follow\">serveur VPS<\/a>.<\/p>\n<h2>\u00c9tape 1 : Mettre \u00e0 jour votre serveur VPS<\/h2>\n<p>Tout d&#8217;abord, assurez-vous que votre serveur VPS est \u00e0 jour. Connectez-vous \u00e0 votre serveur via SSH et ex\u00e9cutez les commandes suivantes :<\/p>\n<pre><code>sudo apt update\r\nsudo apt upgrade -y<\/code><\/pre>\n<p>Garder votre syst\u00e8me \u00e0 jour garantit que vous avez les derniers correctifs de s\u00e9curit\u00e9 et fonctionnalit\u00e9s.<\/p>\n<h2>\u00c9tape 2 : Installer Nginx<\/h2>\n<p>Ghost utilise Nginx comme proxy inverse, donc installons Nginx sur votre serveur VPS :<\/p>\n<pre><code>sudo apt install nginx -y<\/code><\/pre>\n<p>Une fois Nginx install\u00e9, vous pouvez le d\u00e9marrer et l&#8217;activer avec les commandes suivantes :<\/p>\n<pre><code>sudo systemctl start nginx\r\nsudo systemctl enable nginx<\/code><\/pre>\n<h2>\u00c9tape 3 : Installer MySQL ou MariaDB<\/h2>\n<p>Ghost n\u00e9cessite une base de donn\u00e9es, et nous allons utiliser MariaDB (un remplacement de MySQL) pour cette configuration. Installez MariaDB en ex\u00e9cutant la commande suivante :<\/p>\n<pre><code>sudo apt install mariadb-server -y<\/code><\/pre>\n<p>Une fois l&#8217;installation termin\u00e9e, s\u00e9curisez la base de donn\u00e9es en ex\u00e9cutant :<\/p>\n<pre><code>sudo mysql_secure_installation<\/code><\/pre>\n<p>Suivez les instructions pour d\u00e9finir un mot de passe root et s\u00e9curiser la base de donn\u00e9es.<\/p>\n<h2>\u00c9tape 4 : Installer Node.js<\/h2>\n<p>Ghost est construit avec Node.js, nous devons donc installer cette plateforme. Ex\u00e9cutez les commandes suivantes pour installer Node.js \u00e0 partir du d\u00e9p\u00f4t officiel de NodeSource :<\/p>\n<pre><code>curl -sL https:\/\/deb.nodesource.com\/setup_16.x | sudo -E bash -\r\nsudo apt install nodejs -y<\/code><\/pre>\n<p>V\u00e9rifiez l&#8217;installation en consultant la version :<\/p>\n<pre><code>node -v<\/code><\/pre>\n<h2>\u00c9tape 5 : Installer Ghost CLI<\/h2>\n<p>Ghost-CLI est un outil en ligne de commande qui facilite l&#8217;installation, la configuration et la gestion de Ghost. Installez-le globalement sur votre serveur VPS en utilisant npm :<\/p>\n<pre><code>sudo npm install ghost-cli@latest -g<\/code><\/pre>\n<h2>\u00c9tape 6 : Cr\u00e9er un r\u00e9pertoire pour Ghost<\/h2>\n<p>Cr\u00e9ez un r\u00e9pertoire pour votre blog Ghost. Ce r\u00e9pertoire h\u00e9bergera vos fichiers de blog. Dans cet exemple, nous allons cr\u00e9er un r\u00e9pertoire sous <code>\/var\/www\/ghost<\/code> :<\/p>\n<pre><code>sudo mkdir -p \/var\/www\/ghost\r\nsudo chown $USER:$USER \/var\/www\/ghost\r\ncd \/var\/www\/ghost<\/code><\/pre>\n<p>N&#8217;oubliez pas de remplacer <code>$USER<\/code> par votre nom d&#8217;utilisateur r\u00e9el.<\/p>\n<h2>\u00c9tape 7 : Installer Ghost<\/h2>\n<p>Depuis le r\u00e9pertoire Ghost, installez Ghost \u00e0 l&#8217;aide de l&#8217;interface CLI :<\/p>\n<pre><code>ghost install<\/code><\/pre>\n<p>Pendant l&#8217;installation, vous serez invit\u00e9 \u00e0 fournir des informations telles que l&#8217;URL du blog, les informations sur la base de donn\u00e9es MySQL et la configuration des e-mails. Suivez les instructions et configurez votre blog Ghost comme n\u00e9cessaire.<\/p>\n<h2>\u00c9tape 8 : Configurer Nginx<\/h2>\n<p>Une fois Ghost install\u00e9, vous devez configurer Nginx pour agir comme un proxy inverse pour votre blog. Ghost cr\u00e9era automatiquement un fichier de configuration Nginx. Pour appliquer la configuration, red\u00e9marrez Nginx :<\/p>\n<pre><code>sudo systemctl restart nginx<\/code><\/pre>\n<p>Vous pouvez maintenant acc\u00e9der \u00e0 votre blog Ghost \u00e0 l&#8217;adresse de domaine ou \u00e0 l&#8217;IP que vous avez sp\u00e9cifi\u00e9e lors de l&#8217;installation.<\/p>\n<h2>\u00c9tape 9 : S\u00e9curiser votre serveur VPS avec SSL (facultatif)<\/h2>\n<p>Si vous souhaitez s\u00e9curiser votre blog avec SSL, vous pouvez installer Let&#8217;s Encrypt. Ghost-CLI facilite l&#8217;activation de SSL en ex\u00e9cutant :<\/p>\n<pre><code>ghost setup ssl<\/code><\/pre>\n<p>Ce script installera automatiquement Let&#8217;s Encrypt et configurera votre serveur Nginx pour utiliser SSL pour HTTPS.<\/p>\n<h2>Conclusion<\/h2>\n<p>F\u00e9licitations ! Vous avez d\u00e9ploy\u00e9 avec succ\u00e8s Ghost Blog avec Nginx sur votre serveur Debian 12 <a href=\"https:\/\/netcloud24.com?language=french&amp;currency=4\" target=\"_blank\" rel=\"follow\">VPS<\/a>. Cette configuration garantit un environnement rapide, s\u00e9curis\u00e9 et \u00e9volutif pour votre blog. Si vous avez besoin de plus de ressources ou souhaitez am\u00e9liorer votre infrastructure, envisagez d&#8217;utiliser un <a href=\"https:\/\/netcloud24.com?language=french&amp;currency=4\" target=\"_blank\" rel=\"follow\">serveur VPS performant<\/a> de NetCloud24.<\/p>\n<\/div>\n<p><a href=\"https:\/\/de.netcloud24.com\/\" target=\"_blank\">Windows VPS Deutschland<\/a><\/p>\n<p><a href=\"https:\/\/es.netcloud24.com\/\" target=\"_blank\">Windows VPS Espa\u00f1a<\/a><\/p>\n<p><a href=\"https:\/\/nl.netcloud24.com\/\" target=\"_blank\">Windows VPS Nederland<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">Windows VPS Italia<\/a><\/p>\n<p><a href=\"https:\/\/pt.netcloud24.com\/\" target=\"_blank\">Windows VPS Portugal<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">VPS Windows Italia<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Sverige<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Norge<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS T\u00fcrkiye<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows RDS (Remote Desktop Services)<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Comment impl\u00e9menter Ghost Blog avec Nginx sur Debian 12 Ghost est une plateforme de blog open-source populaire, l\u00e9g\u00e8re et facile \u00e0 d\u00e9ployer. Dans ce guide, nous allons\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-375","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=375"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/375\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}