Skip to content

Comment déployer Ghost Blog avec Nginx sur Debian 12

Netcloud24
Cloud Infrastructure Expert
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

 

 

Dans ce tutoriel, nous allons vous montrer comment déployer Ghost Blog en utilisant Nginx sur Debian 12. Nous allons également utiliser un serveur vps pour cette installation.

Prérequis

  • Un serveur vps exécutant Debian 12.
  • Accès root ou sudo au serveur.
  • Node.js version 14 ou supérieure installée.
  • MySQL ou SQLite pour la base de données.

Étapes d’installation

1. Mettez à jour votre serveur

Commencez par mettre à jour votre système :

sudo apt update && sudo apt upgrade -y

2. Installer Nginx

Pour installer Nginx, exécutez la commande suivante :

sudo apt install nginx -y

3. Installer Node.js

Ajoutez le PPA NodeSource et installez Node.js :

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt install nodejs -y

4. Installer Ghost CLI

Installez Ghost CLI globalement :

sudo npm install -g ghost-cli

5. Créer un répertoire pour Ghost

Créez un répertoire pour votre blog Ghost :

sudo mkdir /var/www/ghost
sudo chown $USER:$USER /var/www/ghost
cd /var/www/ghost

6. Installer Ghost

Installez Ghost dans le répertoire créé :

Visual overview of Comment déployer Ghost Blog avec Nginx sur Debian 12
Visual overview: Comment déployer Ghost Blog avec Nginx sur Debian 12
ghost install

Suivez les instructions à l’écran pour configurer Ghost.

7. Configurer Nginx

Créez un fichier de configuration Nginx pour Ghost :

sudo nano /etc/nginx/sites-available/ghost

Ajoutez la configuration suivante :

server {
        listen 80;
        server_name votre_domaine.com;

        location / {
            proxy_pass http://127.0.0.1:2368;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }

Remplacez votre_domaine.com par votre nom de domaine.

8. Activez la configuration et redémarrez Nginx

Activez le site et redémarrez Nginx :

sudo ln -s /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Conclusion

Vous avez maintenant déployé avec succès votre blog Ghost avec Nginx sur Debian 12 en utilisant un serveur vps. Vous pouvez accéder à votre site et commencer à publier du contenu !

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Key topics covered in Comment déployer Ghost Blog avec Nginx sur Debian 12
Key topics covered in this NetCloud24 guide.

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Practical checklist for Comment déployer Ghost Blog avec Nginx sur Debian 12
Practical checklist for applying the guidance in this article.

Windows RDS (Remote Desktop Services)

Windows VPS

Comment déployer Ghost Blog avec Nginx sur Debian 12
Comment déployer Ghost Blog avec Nginx sur Debian 12
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.